Here is what I have got:
- A free hosting with FTP access (www.example.com)
- A Wordpress-based website, with the instance of the Wordpress installed in a sub-folder of the public_html root directory (www.example.com/wpsite/)
- A paid domain with an address of www.mydomain.net, which has been parked on the www.example.com using their DNS addresses.
The problem I have is as follows:
I want to be able to write my domain's address in the browser's address bar and reach www.example.com/wpsite without any visible form of redirection. I want the browser's address bar to contain www.mydomain.net, with the plausible addition of /wpsite/.
The closest I have managed to get to the desired effect was by using php's header location script, but that modifies the address. What happens is, as soon as I try to access www.mydomain.net I am being redirected to www.example.com/wpsite, and while I want the page to load correctly, obviously, I want the address to remain the same as the domain's address.
And here is what I have tried to no avail:
- php's header location script
- modifying the .htaccess files - ended up causing a redirection error
- jQuery/JavaScript window.history.pushstate - it just didn't work
What would be the best way to achieve my goal? Is it one of the above? Or is moving the Wordpress instance from the /wpsite/ subfolder into the root directory going to cut it?
I would be very grateful for an answer - I did not manage to find it yet, and I am getting truly desperate.