+ Reply to Thread
Results 1 to 8 of 8

Thread: 301 Redirects on Windows 2003

  1. #1
    Gavin is offline Hardcore Geek Gavin has a spectacular aura about
    Join Date
    Aug 2006
    Location
    Dublin
    Posts
    1,074
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 301 Redirects on Windows 2003

    I am needing to learn how to perform a 301 redirect on Windows 2003 that’s for ASP but the site is actually html. I have no idea why this server was chosen for hosting the site.

    As far as I know to perform a 301 re-direct on an html site I would need ISAPI_Rewrite -http://www.isapirewrite.com/docs/ - I have tried the lite version but it fails to redirect the pages.

    I have read that I could use a script command in the header of the page with the redirect but that doesn’t make a difference.

    I have also tried going into the properties of the file via IIS and configure the file to redirect but it makes no difference, the file can still be accessed normally (isn’t this option for ASP pages only?)

    Here is what I am trying to re-direct.

    www.domain.com/index.html > www.domain.com/
    www.domain.com/directory/index.html > www.domain.com/directory/

    Anyone have any ideas on how this done? Long live apache and .htaccess!

  2. #2
    blacknight's Avatar
    blacknight is offline Web Slave blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    7,906
    Thanks
    9
    Thanked 8 Times in 7 Posts

  3. #3
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    from an asp page you will do the redirect as below:

    <%
    ' Permanent redirection
    Response.Status = "301 Moved Permanently"
    Response.AddHeader "Location", "http://www.domain_name.tld/"
    Response.End
    %>

    from an html page you have to use the Meta refresh tag

    <meta http-equiv="refresh" content="1; url=http://www.domain_name.tld/">

    where 1 is measured in seconds.
    :. Web Design & Development Web Design Ireland
    :. Search Engines Optimization Search Engines Optimization
    :. Car Parts & Accessories Car Parts
    :. Cars Ireland Cars Ireland
    :. I Have 2 Find It Directory SEF Directory

  4. #4
    Gavin is offline Hardcore Geek Gavin has a spectacular aura about
    Join Date
    Aug 2006
    Location
    Dublin
    Posts
    1,074
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by blacknight View Post
    Is moving the site to linux an option?
    Not at the moment, management decision

    Louie thanks for the code, I'll give that a shot.

  5. #5
    blacknight's Avatar
    blacknight is offline Web Slave blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    7,906
    Thanks
    9
    Thanked 8 Times in 7 Posts

    Default

    Quote Originally Posted by Cormac View Post
    Not at the moment, management decision
    Pity ... it would make the problems go away

  6. #6
    blacknight's Avatar
    blacknight is offline Web Slave blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold blacknight is a splendid one to behold
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    7,906
    Thanks
    9
    Thanked 8 Times in 7 Posts

    Default

    Hmmmmm

    In Apache you can "trick" the server into parsing any filetype as another eg. you could treat .html files as php
    Is the same possible with IIS?

  7. #7
    Gavin is offline Hardcore Geek Gavin has a spectacular aura about
    Join Date
    Aug 2006
    Location
    Dublin
    Posts
    1,074
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am not sure if that can also be done with IIS, I am at a very basic level with this.

    I did manage to configure ISAPI_Rewrite and redirect all the pages that I needed. That ISAPI_Rewrite is a great tool once you have it up & running.

  8. #8
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    ISAPI_Rewrite is the URL Rewrite engine for IIS so yes Blacknight it can be done.
    :. Web Design & Development Web Design Ireland
    :. Search Engines Optimization Search Engines Optimization
    :. Car Parts & Accessories Car Parts
    :. Cars Ireland Cars Ireland
    :. I Have 2 Find It Directory SEF Directory

+ Reply to Thread

Similar Threads

  1. Crontab Equivalent For Windows?
    By blacknight in forum Coding Help
    Replies: 0
    Last Post: 09-08-2006, 09:57 AM

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64