The opening mode is different when I open it:
The apache. htaccess configuration file is used to open the write mode in RewriteEngine On.
Apache pseudo-static html (URL Rewrite) setting method
Phpma: Open the configuration file httpd. conf of Apache.
Phpma 2: # LoadModule rewrite_module modules/mod_rewrite # Remove
Phpma 3 is added in httpd. conf:
The code is as follows: |
Copy code |
<IfModule mod_rewrite.c> RewriteEngine On # RewriteCond % {ENV: SCRIPT_URL }(? : Index | dispbbs00000000-0-900000000.html RewriteRule ^ (.*? (? : Index | dispbbs00000000-(-0-942500000000.html $ 1.php? _ Is_apache_rewrite = 1 & __ rewrite_arg = $2 </IfModule> |
The httpd. ini configuration file of iis opens the write mode in [ISAPI_Rewrite.
Open your httpd. ini and find
[ISAPI_Rewrite]
The code is as follows: |
Copy code |
#3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd. ini and httpd. parse. errors files # From accessing through HTTP RewriteRule ^ (. *)/archiver/([a-z0-9-]+.html) $1/archiver/index. php? $2 RewriteRule ^ (. *)/forum-(%0-9%%*-(%0-9%%%%%%%.html $1/forumdisplay. php? Fid = $2 & page = $3 RewriteRule ^ (. *)/thread-(0-9000000000000-(0-9000000000000-(0-90000000000000000.html $1/viewthread. php? Tid = $2 & extra = page % 3D $4 & page = $3 RewriteRule ^ (. *)/profile-(username | uid)-(. + ?). Html $1/viewpro. php? $2 = $3 |
For more details, see: http://www.111cn.net/wy/96/iis.htm
Differences
Apache does not need a website domain name, while iis requires a website domain name. In IIS, the URL to be rewritten has a question mark (?) To escape a vertex (.), add.
The differences are as follows:
Iis:
The code is as follows: |
Copy code |
RewriteRule ^ (. *)/category(d1_0000.html $1/index. php? Catid = $2 |
Apache:
The code is as follows: |
Copy code |
RewriteRule into category(d00000000.html $ index. php? Catid = $1 [QSA, L] |