|brotherhood of LAN|
| 7:06 am on Jul 2, 2004 (gmt 0)|
I think this is the popular one
Not free unfortunately
| 10:44 pm on Jul 6, 2004 (gmt 0)|
Thanks brotherhood - I just have the one site on a virtual host so I don't think I have the ability to install something at this level.
I've decided to simply wait for the SE to pick up the new pages then delete the old pages. I've put up a custom 404 page that refreshes after 7 seconds to the site map.
Less than ideal, but it's a new site (3 months old) in for the long haul so I'll just have to wear the delay.
It's weird working in an environment where you have such little control....
| 6:20 am on Jul 7, 2004 (gmt 0)|
As long as you can have a custom 404 page you can do this.
The basic plan for the 404 is this:
read requested url from query variable passed by iis for the 404
if one of your old pages, 301 redirect to new page
return a 404
the above presumes that you erase all your old pages so that iis will invoke your custom 404 because it cannot find the page requested.
| 6:47 am on Jul 7, 2004 (gmt 0)|
Thanks plum, you are giving me some hope....
The hosting company advised me to create a 404b.htm in a directory called /errormsg. (Is this sounding familiar?)
I cannot see a query variable in the url, the dead page is visible as the url when the 404b.htm page is displayed. Can you please tell me what to test for and how (ie. is there some way to query the url string using html?)
Also, how does one actually return a 301?
I'm pretty sure ASP is available on the site (included in the price) so perhaps I should be using an ASP approach? Or perhaps a "frontpage extension"? It's all Greek to me!
Many thanks, Sam.
| 6:51 pm on Jul 7, 2004 (gmt 0)|
Well the first thing that you would do is to create an asp page named whatever you want. Now either through your control panel or the hosting company, they will have to change the default 404 to the page you created.
Now in the new 404 page, let's say you have it named 404.asp.
Within this page you would have something like this.
oldurl = Request.ServerVariables("QUERY_STRING")
If oldurl = "http://www.oldsite.com/old-page.html" Then
Response.Status = "301 Moved Permanently"
Response.addheader "Location", "http://www.newsite.com/new-page.html"
Oh, check this thread also. [webmasterworld.com...]
Now this isn't tested, but it should work.
| 7:02 pm on Jul 7, 2004 (gmt 0)|
Regarding the original question, what is the .htaccess equivelant for doing 301 redirects? You manage this from the IIS console. You can select a file or folder, and then specify the new location and whether or not this is a permanent or temporary redirect.
Not that this helps you in a shared hosting environment :)