0

It should first check if the first /$1/ is a directory and if not add a directory before it.

Examples:

1- pizza
2- pizza/olives

Should rewerite the url to:

1- menu/pizza
2- menu/pizza/olives

How is this done?

1 Answer 1

0
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ http://mysite.com/menu/$1 [L,QSA]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .