<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
此htaccess规则不会重定向404错误或只是将未找到的页面重定向到索引页
我做错了什么?
我的localhost网址由IIS生成,因此它显示为:localhost:26139 /
但即使我将其作为我的重写基础的前缀,它也不起作用。
答案 0 :(得分:1)
IIS本身不使用.htaccess文件。
在IIS中使用名为Web.config的文件,您需要处理该文件以进行重定向