DNN converts the query strings in the URLs by default. The only parameter in the query string that remains as such is the
UTM_parameter. Users may want to avoid their query strings being converted. This article provides information on how to retain a query string parameter and value in the URL. It also details how to apply this setting globally in Evoq 9.2.2.
The reason why the
UTM query strings are not rewritten is that they are included in the Keep in Querystring Regular Expression section in the AUM (Advanced URL Management). If you would like a specific query string not to be converted into paths, please follow the procedure below:
- Navigate to Settings > SEO.
- Go to URL Management > Expressions.
- Add the query for which you would like to avoid the conversion in the Keep in Querystring Regular Expression section.
By default, the Keep in Querystring Regular Expression section contains the following:
For example, if you want to retain the
test-sourcequery parameter, the Keep in Querystring Regular Expression section should be as follows:
- Click Save.
- Clear your browser's cache, and try to load it again.
test-sourceexample, the link is
The Keep in Querystring Regular Expression field has a global icon setting. In other words, this setting is a host setting and is applied to all sites in the installation. However, there is a bug in Evoq 9.2.2 that causes it to use the Portal setting instead of the Host setting. If you are using Evoq 9.2.2, to make this setting work globally, follow one of the options below:
- Upgrade to Evoq 9.3.0.
- Manually insert the setting into the
HostSettingstable, and remove the configuration from the
- Go to Settings > SQL Console.
- Edit the
HostSettingstable by executing the command below:
IF NOT EXISTS (SELECT *
WHERE settingname = 'AUM_KeepInQueryStringRegex')
INSERT INTO hostsettings
- Delete the Portal specific setting and force the application to use the global value by executing the following command:
DELETE FROM portalsettings
WHERE settingname = 'AUM_KeepInQueryStringRegex'
When you go to the URL again, the query string persists.