0

I have domain (http://example.com) where the contents of the main domain is placed inside public_html and my subdomain (eg.example.com) where the contents of that subdomain is placed in a separate folder outside public_html.

I want to redirect the subdomain to main domain index.php without altering the browsing url. How to solve this problem.

shalin
  • 373
  • 3
  • 19
  • you can do this by reverse proxy https://stackoverflow.com/questions/224664/difference-between-proxy-server-and-reverse-proxy-server – Artem Ilchenko Oct 24 '18 at 08:48
  • do you want to redirect or execute the index.php that is in the main domain? if you just want to execute, you can do `require('../public_html/index.php');` – Sahith Vibudhi Oct 24 '18 at 09:19
  • I want to execute the index.php that is in the main domain. but the url should remains unchanged (eg : http://eg.example.com) @new_user – shalin Oct 24 '18 at 09:25

0 Answers0