Welcome to WebmasterWorld Guest from 54.227.1.130

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

desire www required and no direct subdomain.domain access

rewrite using HTTP_HOST or %{REQUEST_URI}

     

privacyman

6:16 am on Feb 17, 2007 (gmt 0)

10+ Year Member



I got myself confused.

I have several domains under one hosting package.

Example is mainsite.com (which the hosting pkg was originally
set up for), but now I also have subdomains of
subsite1.com subsite2.com and subsite3.com

subsite1.com is at mainsite.com/subdir1
subsite2.com is at mainsite.com/subdir2
subsite3.com is at mainsite.com/subdir3

Apparently the subsites can be accessed via subdir.mainsite.com

1) I would like to prevent access via subdir.mainsite.com

and

2) I would also prefer to see uniformity of any linking urls to
my sites (most use www) thus if!^www\. then rewrite the
mainsite.com to www.mainsite.com
likewise for the subsites....
subsite2.com to www.subsite2.com

Is there any easy way of doing this so that if I later
add any other subsites that I won't have to mess around much
with the coding? Not sure if the host "requires" access via
the subdir.mainsite.com stucture. It's shared hosting and
we are allowed up to 10 subdomains per main hosting account.

Don't want the search engines to consider the domains as being
any dupe content or have problems with the domains being under
the single hosting package. (I do keep away from having dupe
content). They are independent domains/sites.

Hope this isn't confusing to anyone. I have seen some similar
rewriting done using HTTP_HOST and by using %{REQUEST_URI}
and I don't know which would be better to be used or if both
are needed. Any scripts that I might use can be independent
within their own subdirectory, eg subdir1/cgi-bin/

Thanks. George.

jdMorgan

3:36 pm on Feb 19, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you can post the code you've tested, that would be a big help. Please see our forum charter [webmasterworld.com] for clarification.

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month