Php web.config到.htaccess转换重写
如何将其转换为.htaccess?Php web.config到.htaccess转换重写,php,apache,.htaccess,mod-rewrite,web-config,Php,Apache,.htaccess,Mod Rewrite,Web Config,如何将其转换为.htaccess? 我搜索了一个转换器,但没有人可以手动操作 创建.htaccess文本文件 为每个集合制作一个脚本 url=“^…*$”regexp保持匹配模式 而) 例如: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules>
我搜索了一个转换器,但没有人可以手动操作
- 创建
文本文件.htaccess
- 为每个
集合制作一个脚本
regexp保持匹配模式url=“^…*$”
- 而
)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1e" stopProcessing="true">
<match url="^Assets/(.*)$" />
<action type="Rewrite" url="/php/Assets/{R:1}" />
</rule>
<rule name="Imported Rule 0" stopProcessing="true">
<match url="^(.*)$" ignoreCase="true" />
<action type="Rewrite" url="/php/index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
#
# ↓
重写规则^…*$/path.php?参数=$1[NC,L]
# ↑ ↑
#旗帜
这些都没有帮到你吗?可能是我尝试的复制品,但不起作用,是不是出了什么问题?RewriteCond%{REQUEST_FILENAME}上的RewriteEngine-f RewriteCond%{REQUEST_FILENAME}-重写规则^Assets/(.*)$/php/Assets/$1[NC]重写规则^(.*)$/php/index.php?url=$1[L,NC]您的问题有一个答案。无论是
包装还是重写cond
都不合理。“不起作用”不是一个问题描述。日志条目和重写日志被删除。
# <action url=>
# ↓
RewriteRule ^...*$ /path.php?param=$1 [NC,L]
# ↑ ↑
# <match url=> flags