.htaccess rewrite everything in the parent directory.

I am trying to rewrite each request to the parent directory.

This is the contents of my .htaccess

RewriteEngine on
RewriteRule ^(.*)$ ../$1

Unfortunately, this does not work and causes a "Bad Request" error. Is it possible?

+5
source share
1 answer

. * must be caught between () so the system knows that it is supposed to “remember” the expression as $ 1.

+1
source

All Articles