Search code examples
wordpressazurehttp-redirectsubdomainwildcard-subdomain

How the subdomain keep the full url of the url that it is redirecting to?


I am not sure about the title of my question so let me an explain the situation with example:

I have a wordpress website at: wwww.mywebsite.com (DNS: Godaddy, hosted on Azure, SSL enabled)

I setup a forum website hosted on another Azure account with a url like: myforum.azurewebsites.net

I want to have a subdomain "forum" (forum.mywebsite.com) to redirect to the forum website. I managed to achieve the redirection by using Godaddy subdomain settings. I also enabled the masking so the user see the forum.mywebsite.com on the browser.

The problem is that the forum url does not show the subfolders url. For instance if someone wants to login, the user should see: forum.mywebsite.com/login but the user only sees: forum.mywebsite.com

How can I achieve the redirection in a way that the url keeps the subfolder path as well.


Solution

  • You will want to set the custom domain on Azure which will require you to create a CNAME record in your DNS on Godaddy for forum.mywebsite.com that has the value of myforum.azurewebsites.net