![](/img/trans.png)
[英]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.