Guest User!

You are not Sophos Staff.

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

Redirecting root domain to subdirectory on webserver

Hello

I have a NAS in my internal LAN that also works as a webserver. On this NAS I have different subdirectories with different websites. I would like one of these subdirectories to be the main webpage, that is shown to the user.

For example, if the user enters www.mydomain.com or mydomain.com I would like to show him the contents of the website inside the folder "portal". For this I have setup the rule below. It seems to work. At least I get access, but it shows an empty page since there is nothing in the root directory. At the moment I have to enter www.mydomain.com/portal to reach the page I want, but I would like it to be just www.mydomain.com.

Here my settings, the domains were replaced.

Thanks

Roger



This thread was automatically locked due to age.
Parents
  • I am also in a similar situation right now. i have sophos xg 210... right now i think the only solution is to redirect to a sub directory using the web server itself like this one:

    <meta http-equiv="refresh" content="0; URL=http://www.site.com/">

    However, this wont work if you wish to force redirect http to https, unless you enable your webserver's ssl feature and install the certificate directly to the webserver for validation instead of uploading it to WAF.

     I have tried using virtual hosting. however it aint work, it will just land on the default public directory or simply forward the request to localhost/127.0.0.1 not to the configured domain name which is necessary to allow it to resolve to the subdirectory.... sigh!

Reply
  • I am also in a similar situation right now. i have sophos xg 210... right now i think the only solution is to redirect to a sub directory using the web server itself like this one:

    <meta http-equiv="refresh" content="0; URL=http://www.site.com/">

    However, this wont work if you wish to force redirect http to https, unless you enable your webserver's ssl feature and install the certificate directly to the webserver for validation instead of uploading it to WAF.

     I have tried using virtual hosting. however it aint work, it will just land on the default public directory or simply forward the request to localhost/127.0.0.1 not to the configured domain name which is necessary to allow it to resolve to the subdirectory.... sigh!

Children
No Data