So I have this code creating a “fake directory”
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(\w+)$ ?username=$1
But now I want a fake subdirectory with it, e.g.
profile/johnsmith/photos
and that will Rewrite to
?username=johnsmith&tab=photos
EDIT
I have tried
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(\w+)$ ?username=$1&tab=$2
1 Answer