WordPress Gravity forms with pretty url (url rewrite) on IIS7

We have a problem with the WordPress instance running on the IIS 7 server. Gravity forms are used to request information to the user.

When we fill out the Gravity form with only user input, it works like a charm. Although, when some information is pre-filled in the Gravity form, using some additional parameters, such as ?param1=1¶m2=2 , there is no record in the database.

If we disable the beautiful WordPress URLs and add paramaters to the URL again, this form will work again. So, we came to the conclusion that with the rewriting rules something . This applies to our current analysis (and my knowledge of IIS rewriting behavior).

I added the current web.config below. Hope someone can give us a hand.

 <?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> 

A path that does not work as expected is http://www.greenfields-kunstgras.nl/voetbalvelden/voetbal-kostencalculator/?utm_source=GF+NL+-+Voetbalvelden+-+Optin&utm_campaign=0b940c24f2-GF+o++ - + Email1 & utm_medium = email & utm_term = 0_75d85ff960-0b940c24f2-96711629

The path that works (if beautiful URLs are disabled) is http://www.greenfields-kunstgras.nl/?page_id=2670&utm_source=GF+NL+-+Voetbalvelden+-+Optin&utm_campaign=0b940c24f2-GF+NL+-+Voetbal+ Email1 & utm_medium = email & utm_term = 0_75d85ff960-0b940c24f2-96711629 # gf_2

When you click on the link, the original behavior in both cases is as expected. Only when the form is completed. When using the first path, recordings are not saved.

+4
source share
1 answer

Well, you can use PHP (without mod_rewrite) for pretty URLs: This solution can help you. Rewrite url in PHP without htaccess

0
source

Source: https://habr.com/ru/post/1495782/


All Articles