[英]Yii2/PHP/IIS7 - URL Rewrite and File Permissions (Pretty URL issue)
[英]WordPress Gravity forms with pretty url (url rewrite) on IIS7
我们遇到了在IIS 7服务器上运行的WordPress实例的问题。 重力形式用于向用户询问信息。
当我们仅使用用户输入的信息填充“重力”表单时,它就像魅力一样。 但是,当使用一些额外的参数(例如?param1=1¶m2=2
在Gravity表单中预填充某些信息时,结果在数据库中没有条目。
如果我们禁用WordPress漂亮的URL并再次将参数添加到URL,则表单再次起作用。 因此,我们的结论是,它有something
做的重写规则。 这是我们当前的分析(以及我对IIS在重写规则上的行为的了解)。
我在下面添加了当前的web.config。 希望有人能帮助我们。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed">
</httpErrors>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule></rules>
</rewrite>
<directoryBrowse enabled="false"/>
</system.webServer>
<appSettings>
<add key="Response.TrySkipIisCustomErrors" value="true"/>
</appSettings>
</configuration>
当您按照链接时,在两种情况下,初始行为都符合预期。 只有在表格最终确定时。 使用第一个路径时不保存任何记录。
那么你可以使用PHP(没有mod_rewrite)漂亮的URL:这个解决方案可以帮助你。 在没有htaccess的情况下用PHP重写URL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.