Subdomain rewrites?


#1

I created a subdomain but when I type that into the browser, it will show the actual folder path instead of doing a url rewrite. Example: sub.mydomain.com will end up displaying mydomain.com/sub/ in the browser.

Is there a way to fix this?


#2

In the web control panel, go to Domains -> Web

Find the domain and click on “Edit”

Now you have five options.

  1. Fully hosted.
  2. A Parked Domain
  3. A Domain Redirect (domain that redirects to another site immediately / browser URL changes).
  4. Display another site at your domain (using a frame; browser URL remains the same).
  5. A Mirrored Domain (a domain that mirrors another site’s content / browser URL remains the same).

You probably have it on #3. In the event you have it on #4, you probably have some “break out of frames” JavaScript that replaces the frameset document with that of the current document.

Of course if it is set to #1, you could have an .htaccess file that attempts to redirect using Apache directives.

What exactly is it currently set to, and what exactly did you expect to happen?

If you really want the files from ~/example.com/subdir to show up when browsing http://sub.example.com/, you need to make the subdomain fully hosted and specify that subdirectory as the “Web Directory”. In the event you want to files from ~/example.com/subdir to show up when browsing to http://sub.example.com/subdir, use the Remap Sub-Dir panel.

:cool: Perl / MySQL / HTML CSS