朋友。我正在用重写规则创建一个.htaccess文件。它在本地主机上运行良好,但在实时服务器上它不起作用。我的主机使用Window服务器。htaccess不工作在iis
我在.htaccess文件写了这个规则:
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
IIS不会执行.htaccess文件。他们是一个Apache的东西。在IIS上进行URL重写时,请参阅http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module –