Redirecting requests for .html pages in subdirectories to the same page in root with .htaccess
Posted
by
Asherion
on Pro Webmasters
See other posts from Pro Webmasters
or by Asherion
Published on 2012-06-19T18:12:35Z
Indexed on
2012/06/19
21:24 UTC
Read the original article
Hit count: 268
I am porting a site from an old version of a CMS to a newer version which has different page addressing techniques. I'm unfortunately not very good with htaccess at all.
URL/blog/sublblog/article.html is now simply URL/article.html
Unfortunately, this will destroy any linking programs they have going, and break all the old links. I need a way to use .htaccess
say:
if request = /(any subdirectory)/(string).html
then redirect to /(string).html
If that makes any sense.
© Pro Webmasters or respective owner