Home  >  Article  >  Backend Development  >  请教htaccess的规则如何转成httpd.ini的规则

请教htaccess的规则如何转成httpd.ini的规则

WBOY
WBOYOriginal
2016-06-13 13:31:09811browse

请问htaccess的规则怎么转成httpd.ini的规则
我用的是opencart的程序,现在要做伪静态,我的服务器是windows服务器,用的是ISAPI_Rewrite进行执行伪静态的,不过我把下面的规则复制到http.ini里后,网站链接都不对,打不开。请问有人知道怎么转成 httpd.ini的规则么?谢谢!

RewriteBase / 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

------解决方案--------------------
http://www.zzxj.net/blog/fxs_2008/archive/2009/01/20/11.html

http://www.zzxj.net/blog/fxs_2008/archive/2009/01/18/1.html

参考下
------解决方案--------------------
apache里的特殊字符可以不转义,但ISAPI_Rewrite里的特殊字符就必须转义。
如(仅仅是字符,而不是正则的表达才转义):
apache:
RewriteRule ^(.*)-tmp-(.*)$ $1.php?$2
ISAPI_Rewrite:
RewriteRule ^(.*)-tmp-(.*)$ $1\.php\?$2

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn