From mod_rewrite to isapi_rewrite
I have a Modx htaccess file which needs to be rewritten from mod_rewrite
to isapi_rewrite
2.
Can someone please help me? The following lines need to be changed for isapi_rewrite
2:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
RewriteRule ^(manager|assets) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 开发者_C百科%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Many thanks.
I would strongly recommend using ISAPI_Rewrite v3 as it has 99% mod_rewrite compatible syntax (from the above config only Options won't work) while ISAPI_Rewrite v2 doesn't support "RewriteCond %{REQUEST_FILENAME} !-f" and some other directives.
Also if you are on IIS 7 (7.5) you may use Helicon Ape which implements 30+ Apache modules (including mod_rewrite) on Windows systems. Ape will support the above config as is, without any modifications.
精彩评论