Forum Moderators: phranque
I have just converted most of a site over to php. I am wondering if there is a quick solution to redirecting all of the old .htm files to the index page, which is the only remaining .htm file
Trying to avoid the tedium of redirecting all of those pages individually you know :)
WBF
1. Start here [webmasterworld.com] and learn how to build your own redirect.
2. Do some more searching.
3. Hope someone posts some code for you.
We discourage number three and prefer to limit discussion to aspects of redirects that have not been previously discussed but you never know...
RedirectMatch 301 \.htm$ /
(index.htm would also be redirected this way - not a bug but a feature as [thesite.com...] is anyway a better URL to use than [thesite.com...]
Of course this would mean that people clicking on a link would end up somewhere they did not expect. It would be more elegant if every old page could be redirected to the new page. Is there a simple relationship between old and new URL?