ISAPI_Rewrite与Mod_Rewrite的对比

ISAPI_Rewrite中httpd.ini的写法为:

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*).html /index\.php\?do=$1&%{QUERY_STRING} [L]
RewriteRule ^(w+).html /index\.php\?do=$1&%{QUERY_STRING} [L]

而Mod_Rewrite中.htaccess的写法是:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (.*\.html)$ index\.php\?do=%{HTTP_HOST}/$1&%{QUERY_STRING} [L]
RewriteRule (^\w+\/?)$ index\.php\?do=%{HTTP_HOST}/$1&%{QUERY_STRING} [L]
</IfModule>


除了基本的正则外,只是在ISAPI_Rewrite用$而Mod_Rewrite用%

你可能感兴趣的:(ISAPI_Rewrite与Mod_Rewrite的对比)