Using subdomains and URLs

Avatar
  • updated
  • Answered

Say I create a subdomain: video.example.com  and through cpanel it is set to redirect to example.com/video. And this works fine if I type in video.example.com I end up at the index.html file that exists at example.com/video.

Now say that I want to add a specific url to that subdomain...say another webpage that exists in the "video" folder... call it page2.html. If I point my browser at video.example.com/page2.html I end up with a 404 error instead of the page I was looking for.

Is there any way to be able to use subdomains to point to any URL within that document root?

Avatar
IMH Support Agent 3
  • Answered

Customizing rewrite rules can be complicated, and it's outside of the normal scope of support we have in this forum. However, you may want to check the rule itself for the appropriate regular expression to match any file that may be used on that URL.