Forum Moderators: phranque

Message Too Old, No Replies

Masking Path to Subdomain

Just need help in the right direction

         

JohnDW

4:10 am on Apr 5, 2007 (gmt 0)

10+ Year Member



I'm trying to show a clean path in a browser when individuals are visiting an addon domain on my webserver. I think I read that this isn't possible with rewrite; is that correct?

If someone types in www.domain1.com

it redirects them to www.domain1.domain2.com/html/index.php

Is there a way to clean this up?

I don't need a full explanation, just a link in the right direction if possible. Thanks for your help.

v/r,

John

jdMorgan

5:14 am on Apr 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This all depends on exactly how the add-on domain is "added on." If it's done with an external redirect --as you indicated-- there's not much you can do, unless it's possible to let all add-ons default to the same directory used to store your "main" domain files. If you can do that, then you can put your own code in .htaccess to 'sort out' all the domains into separate subdirectories using internal rewrites instead of external redirects.

Basically, add-on domains should be resolved to (sub)directories using internal rewrites, not external redirects. Once the subdirectory filepath is 'exposed' as a URL to the client with a redirect, the damage is done.

Jim