mercredi 29 avril 2015

.htaccess redirect from subfolder to root keeping paths

I'm migrating a site so I need to redirect all content from a to the and keep all the links, for example:

needs to redirect to


needs to redirect to

my .htacess looks like this:

RewriteEngine on
RewriteRule ^subfolder/(.*)$ /$1 [R=301,L]

It is redirecting all to but does not follow the old paths it just sends all request to home page

Aucun commentaire:

Enregistrer un commentaire