RewriteEngine On #RewriteCond %{REQUEST_URI} !^/$ #RewriteCond %{DOCUMENT_ROOT}/root%{REQUEST_URI} -d [OR] RewriteCond %{DOCUMENT_ROOT}/root%{REQUEST_URI} -f RewriteRule !^/?root/ /root%{REQUEST_URI} [PT,L] RewriteCond %{REQUEST_URI} !^/?script/testapp_fastcgi.pl RewriteRule !^/?root/ script/testapp_fastcgi.pl%{REQUEST_URI} [L]