I\'m having a few issues getting rewrite rules for a specific subdirectroy (different from the webroot) and I\'m at a loss as to where to put them.
/var/www/ (webroo
I am not quite sure what you want to express - I will explain what your current ruleset does.
do not use this, user rewrite-once instead
url.rewrite = (
you keep map any index.php and test.php (even foo-test.php) back to the webroot
"(index.php|test.php|favicon.ico)" => "/$1",
you rewrite any subfolder or files containing css,files,tmp or js in it's url back to the webroot
"(css|files|img|js)/(.*)" => "/$1/$2",
now this matches anything in the your webroot (no subdirs!) and keeps get requests
"^([^\?]*)(\?(.+))?$" => "/index.php?url=$1&$3",
)
Update This should do it (untested)
url.rewrite-once = (
"^/subdir/(?:index.php|test.php|favicon.ico)" => "$0",
"^/subdir/(?:.+/)?(css|files|img|js)/(.*)" => "/subdir/$1/$2", #update #2
"^/subdir/(?:/(?:.+/))?([^\?]*)(?:\?(.+))?$" => "/subdir/index.php?url=$1&$2",
"^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
"^/(.*.php)" => "$0",
"^/(.*)$" => "/index.php/$1"
)