I am trying to add subdomain URL for each user.

For eg: if my site has a user name as John then the URL which he will be sharing with his users is http://john.example.com and this should open the home page for my site http://example.com

My site is in WordPress and hosted over WpEngine server I have enabled the wildcard domain mapping from WpEngine also added respective A records.

Now the issue is if I try to hit http://john.example.com WordPress redirects me to http://example.com

instead I want it to stay and send a request like
http://john.example.com => http://example.com?user=john

do I need to write any htaccess/nginx rule for this?

0

Leave a Reply

Your email address will not be published. Required fields are marked *