Forum Moderators: open

Message Too Old, No Replies

301 Redirect on GoDaddy hosted site - cannot use ISAPI

need to point old .htm pages to new .aspx pages

         

washgirl

5:44 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



We recently re-launched our site and now need to point old .htm pages to new .aspx pages. We’re on shared hosting with GoDaddy and are not able to customize our IIS settings to add the ISAPI dll. Our domain name didn't change, it's just the page names that have changed. And unfortunately the new pages were created with a CMS in ASP.NET so we can't change their URLs. So…. we need to create the most important oldpage.htm files and then add redirect script to them.

We haven’t located the correct code for redirecting to deal with a move from www.site.com/oldpage.htm to www.site.com/newpage.aspx. If you have any “code for dummies” that you could share with me so that I can go this less optimal route (my only option at this point), I’d be grateful for it.

Ocean10000

6:47 pm on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Question. Were the pages actually static html files which you are trying to redirect? What was the file extension which they ended in? (htm,html,aspx,asp)

Some options that come to mind are.

Option 1
See if GoDaddy has the ability in its control panel to do file redirects, and use it to redirect it to the new file.

Option 2
If the files ended in aspx or asp originally you can do a simple redirect via global.asax or global.asa file. By binding to the begin request and comparing the url and issuing the proper 301 redirect if it matches one you are replacing.

Option 3. (this is usually the last resort hack)
In GoDaddy's control panel map the 404 static file, to a 404.aspx page, and use it to do the redirects or render a static 404 message.

I will post some sample code a bit later.

washgirl

8:33 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



Thanks so much for your input. The old pages were static, so we're basically needing to redirect from www.site.com/oldpage.htm to www.site.com/newpage.aspx. I think the only thing I can do at this point, and given our shared server, is to post some code on www.site.com/oldpage.htm... I just don't know the proper code!?!

Ocean10000

12:28 am on Jan 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Since you have limited options the simplest I can give you is the following.

Wikipedia article on Meta refresh [en.wikipedia.org].

On the page if the user has meta redirects blocked you also want to put "this page has moved too" and give the link and ask the users to update their bookmarks etc. Doing this will help the search engine spiders find the new pages faster as well.

washgirl

9:06 pm on Jan 15, 2009 (gmt 0)

10+ Year Member



Ocean10000 -- a million thanks. That is a great workaround for us. We set the refresh to 3 seconds so that users would have some visibility into why the redirect is occuring. You made our day!

jdMorgan

10:47 pm on Jan 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Be aware that Yahoo! --and possibly the other major search engines as well-- will treat a meta-refresh with a "noticeable" delay as a 302-Found (or Moved temporarily) redirect, and not as a 301-Moved permanently redirect. So you may want to re-think that 3-second delay.

Ref: How does the Yahoo! Web Crawler handle redirects? [help.yahoo.com]

Jim

washgirl

1:25 am on Jan 16, 2009 (gmt 0)

10+ Year Member



Aie! I thought the delay would be more user-friendly, less shocking than a fast redirect. But I will alter based on this input. Thank you, Jim!