.htaccess rewrite directories with index.html to subdirectory
At the site were some directories with html files like:
site.com/folderone/index.html site.com/foldertwo/index.html
and it was available by links like: site.com/folderone site.com/foldertwo
now all these directories moved to /old-pages:
site.com/old-pages/folderone/index.html
site.com/old-pages/foldertwo/index.html
but old links should be available, so .htaccess file: RewriteEngine on
RewriteRule ^folde(.*)$ /old-pages/folde$1 [L]
it's rewrite correct site.com/folderone/ and site.com/folderone/index.html
but for site.com/folderone it's not rewrite but redirect to
site.com/old-pages/folderone/
No comments:
Post a Comment