0

Sorry, if similar question is answered already.

Q : When accessing example.com/subdirectory user should be redirected to newdomain.com.

Details : I've 2 domains (example.com and newdomain.com) and 1 hosting (shared hosting) purchased. Both domains are purchased from different domain providers. In this example.com and hosting is purchased from same provider and newdomain.com is purchased from another provider. No hosting for newdomain.com.

Now I've code for site example.com is located in /html/ directory and I've newdomain directory added inside /html/ directory, so sub-directory can be accessed using web as 'example.com/newdomain'. What I wanted to achieve is when I access newdomain.com I want site from example.com/newdomain to be accessed.


Most of the answer I've found are related to, accessing sub-directory as main domain which are configured in .htaccess file. But I'm not understanding where exactly those changes will live in. Will I need to do any changes at newdomain.com side with regards to A Name or C Name, etc.

Is this achievable, If yes, can someone please point me in right direction, or provide a step (if possible) how can I achieve this?

Yogesh
  • 397
  • 3
  • 18

1 Answers1

0

If your hosting provider allows you to have addon domain then you can do that, no need modify htaccess. Modification of htaccess is only possible when you have hosting on both domain.

Parth Shah
  • 21
  • 3