echo ""; echo ""; echo ""; echo ""; if(!is_admin){echo "";} » URL RewriteRule在httpd.conf和.htaccess中的不同点 仲子说

2008-12-07

URL RewriteRule在httpd.conf和.htaccess中的不同点

Posted in Apache at 16:32 Author:仲远

标签:

????Web Server??????Apahce?????Apahce??????URL Rewrite?Apache?mod_rewrite????????????????????URL??Apache???URL Rewrite???????????????httpd.conf?????rewriterule(????)?????????????.htaccess???rewriterule(????)?????????????????????URL??????????????????????????????????

?Httpd.conf??
?1?Request URI???????????
?2????Cache????????????????
?3????-f??!-f??????????????

?.htaccess?????????
?1?Request URI?????????
?2????Cache????????????????
?3????-f??!-f??????????????

????????httpd.conf???????URL??????????????“/”??????????????.htaccess?????????????????

httpd.conf
RewriteRule ^/$ /cache/index.html [QSA]
RewriteRule ^/([^.]+)$ /cache/$1.html [QSA]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

.htaccess
RewriteRule ^$ cache/index.html [QSA]
RewriteRule ^([^.]+)$ cache/$1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

????????????????????????

本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:

1 Comment »

  1. 哈秀时尚 said,

    2013年August12日 at 17:33

    感谢博主

Leave a Comment

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word