1
我一直在尝试将下面的web.config转换为.htaccess。 web.config正在工作,但不是我转换为.htaccess的人。Web.config to .htaccess无法正常工作
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteBase" stopProcessing="true">
<match url="[?\.\/]" />
<action type="None" />
</rule>
<rule name="RewriteTemplate">
<match url="^([0-9a-zA-Z_]+)" />
<action type="Rewrite"
url="/?PAGENAME={R:1}"
appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.serviceModel>
<behaviors />
</system.serviceModel>
</configuration>
下面是什么有转换,并没有工作。
RewriteEngine On
RewriteCond %{REQUEST_URI} [?\.\/][L]
RewriteRule ^([0-9a-zA-Z_]+) /?PAGENAME=$1 [QSA,L]
我花了3个小时浏览网站,但无法使其工作。 我想要它,如果URL没有任何“。”然后继续下一个。在原始域名“xxx.xx.com/abc”<之后获得任何词 - 在这种情况下获取abc。 我完全合乎心意的,现在(我已经做错了
谢谢我试过了,没有工作,(我可以访问该页面从“本地主机:8006 /?PAGENAME = TestPage”,但不工作时,我用http:// localhost:8006/TestPage – 2015-01-21 09:03:12
是的,对不起,使用我编辑的代码(不包括/) – Croises 2015-01-21 09:12:38
工作!思考[?\ ]完成这项工作,但![。]工作完美,你节省了我的一天,谢谢;) – 2015-01-21 09:54:24