Web.config .htaccess 无法工作

Web.config to .htaccess cannot work

我一直在尝试将下面的 web.config 转换为 .htaccess。 web.config 正在运行,但不是我转换为 .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= [QSA,L]

我花了 3 个小时浏览该网站,但无法正常运行。 我想要它,如果 url 没有任何“。”然后进行下一个。在原始域 "xxx.xx.com/abc" <-get abc 之后获取任何单词。 我现在完全疯了;(我做错了什么?

您可以在 .htaccess:

中使用它
RewriteEngine On
RewriteCond %{REQUEST_URI} ![.]
RewriteRule ^([0-9a-zA-Z_]+) /?PAGENAME= [QSA,L]