Home > Enterprise >  Can I use a slug address to respond for a WordPress domain?
Can I use a slug address to respond for a WordPress domain?

Time:05-28

I would like to resolve the following situation:

I have a WordPress website with address www.mywebsite.com with two slugs www.mywebsite.com/subsite1 and www.mywebsite.com/subsite2. I would like to know if I can have two different domains pointing one to each slug, like this:

It's possible? All domains will be on the same hosting server.

CodePudding user response:

Yes, you can use something like Apache or Nginx as a forward proxy server to display the content of those subdomains onto a top-level domain, but you're going to have a lot of challenges with paths.

Fully-qualified paths (starting with http(s)://) will still contain the old domain name.

Relative paths (starting with /) will be broken since there is a directory level difference.

If you want to make it work, you will likely need to do some url rewriting, which both webservers support.

You won't be able to do this on standard cheap webhosting companies. Best bet is to buy a basic Linode or Digital Ocean server to allow you to host your own Apache/Nginx.

  • Related