afsy afsy - 2 months ago 7
PHP Question

redirect all subfolder request to a specific folder

I am trying to redirect all the requests to a specific folder inside my domain.

Like this.

www.domain.com/whatever needs to be redirected to www.domain.com/specifiedfolder by preserving the requested address www.domain.com/whatever

Answer

Try this method which will redirect as you expect

RewriteRule ^(.*)$ /specifiedfolder/$1 [L]
Comments