Forum Moderators: phranque
Redirect /oldpagename.htm http://www.example.com/subdirectory/newpagename.aspx
Redirect /oldpagename2.htm http://www.example.com/subdirectory/newpagename2.aspx
... and so on. 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.
Unfortunately when we go to http://www.example.com/oldpagename2.htm, we receive an "oops! page not found" error.
Please help! Our old pages are still appearing in search engines, so this looks very bad for our company.
[edited by: jdMorgan at 7:02 am (utc) on Jan. 6, 2009]
[edit reason] example.com [/edit]
Hold on a moment. That's not entirely true.
It is the names within the server filesystem that have changed.
It is very possible to retain the same URLs - if you use a rewrite to connect the right URL request with the right internal filepath.
A rewrite translates the requested URL into a local filesystem filepath, one that is different to the filepath that is suggested by the URL.
Meanwhile, I don’t have the correct redirect script to deal with a move from www.site.com/oldpage.htm to www.site.com/newpage.aspx. I’m able to create www.site.com/oldpage.htm but haven’t located the correct code for redirecting (I believe the code needs to exist on oldpage.htm rather than 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.
I think you'll likely find the asp.net redirect code in the Forum Library over in our Microsoft IIS Web Server and ASP.NET [webmasterworld.com] forum, as well as a lot more IIS server expertise than you'll find here in the Apache forum... :)
See the "Library" and "Search" links at the top of the forum pages here at WebmasterWorld.
Jim