This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

URL redirect to an absolute URL (inc. query string)

I'd like to use the Webserver Protection module to handle a very specific redirection. Basically, we're in the process of preparing a multilingual site that will handle different domains internally, but until then I'd like to create a manual redirection for a specific domain to a specific URL (with query string).

In other words, I'd like to redirect mydomain.com to mydomain.pl/?lang=en

Alas, I can't seem to be able to do that; I wanted to use the Request Redirection section and a path of "/?lang=en", but then UTM informs me that this path contains invalid characters (it doesn't like the question mark).

So, can this be done, or do I need to spin up an IIS server internally solely to redirect requests?



This thread was automatically locked due to age.
Parents
  • Hi  

    It won't be possible to do that from GUI options. However, you can modify the /var/chroot-reverseproxy/usr/apache/conf/reverseproxy.conf and the line RedirectMatch to do this. First, configure the request redirect without in the path and then modify the file and edit the line. 

    Note: Please reach out to Sophos Support before trying this step if you have a licensed product. If you have a home license, feel free to try this as long as you are comfortable changing things back.

    Hope this helps.

    Regards

    Jaydeep

  • I got the green light from support to try this, however the actual problem this was meant to solve was... already resolved (the target server was reconfigured to handle the domain names, and in the short interim I spun up an IIS server with a redirect).

    Still, since I got the green light I went ahead and tested the proposed solution on some test DNS names, and sadly, it didn't work. It seemed as if my change in the configuration file wasn't being used at all (the Sophos admin panel didn't show the changed link and the redirection kept using the old link without the question mark). Perhaps some service needed to be restarted to re-load the file? Obviously any changes via the UI would overwrite the manual changes in the configuration file, so that's a dud.

    Still, thank you for the suggestion.

  • Thanks for the update.

    It looks like we have reached a limitation on the redirect configuration part. It wouldn't accept ? in a valid redirect path. 

    Regards

    Jaydeep

Reply Children
No Data