问:大哥 能帮我把htaccess转换成web.config么, 不能也非常感谢,毕竟售后之外的事情,实在搞不定了,想在这个子目录下安装个站 web.config 不会写,大哥 能帮我把htaccess转换成web.config么
答:您好,
查看该主机www目录里有一个.htaccess文件,但也已经存在web.config文件, 您是需要将现有.htaccess中的规则进行转换吗,非常感谢您长期对我司的支持!
问:<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{QUERY_STRING} ^/(.*)/$RewriteRule ^tags.php /index.php?m=tags&a=index&name=%1 [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]</IfModule>是这个
答:您好,
iis可以进行规则转换,转换后的规则如下,如无法使用或存在异常,则可能需要进一步调整,常感谢您长期对我司的支持!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="1" stopProcessing="true">
<match url="^tags.php" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^/(.*)/$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/index.php?m=tags&a=index&name={C:1}" appendQueryString="false" />
</rule>
<rule name="2" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
问:http://www.pls118.com/ceshi/tags.php?/%E6%96%B0%E9%97%BB/ 似乎不行呢
答:您好,
rule name=命名的问题,调整后访问404,,规则放到子目录可能会有 别,需要结合实际情况进一步调整,非常感谢您长期对我司的支持!