Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htaccess rewrite everything to parent directory

I'm trying to rewrite every request to the parent directory.

This is the content of my .htaccess

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

Unfortunately this isn't working and causes a 'Bad Request' error. Is this possible?

like image 976
Derk Avatar asked Nov 14 '22 03:11

Derk


1 Answers

the .* should be caught between () this way the system knows it is suppose to "memorize" the expression as $1.

like image 144
Catalin Marin Avatar answered Dec 04 '22 04:12

Catalin Marin