[英]How to convert a .htaccess to a web.config file
I am trying to change this to a web.config file but I am failing:我正在尝试将其更改为 web.config 文件,但我失败了:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [PT,L]
To convert .htaccess rule into web.config first you need to install the URL rewrite module in iis.要将 .htaccess 规则转换为 web.config,首先需要在 ZC7AZE7B5ABC39FCA75279DZ 中安装 URL 重写模块you could download it from the below link:
您可以从以下链接下载它:
https://www.iis.net/downloads/microsoft/url-rewrite https://www.iis.net/downloads/microsoft/url-rewrite
Then after import htaccess rule in iis:然后在 iis 中导入 htaccess 规则后:
1)open iis manager. 1)打开 iis 管理器。
2)double click on URL rewrite module. 2)双击URL重写模块。
3)Click on import rule from the action pane: 3)从操作窗格中单击导入规则:
4)paste your rule in rewrite rule box: 4)将您的规则粘贴到重写规则框中:
5)click apply. 5)点击申请。
https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/importing-apache-modrewrite-rules https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/importing-apache-modrewrite-rules
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.