Welcome to WebmasterWorld Guest from 54.197.171.28

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess interfering with addon domain

is this normal?

   
10:38 am on Aug 21, 2005 (gmt 0)

10+ Year Member



I have an account with several addon domains(created via cpanel), Problem is the main account has a .htaccess doing some url rewriting, and its interfering with the addon domains. :(

Is this to be expected of is the server setup incorrectly?

thanks

3:03 pm on Aug 21, 2005 (gmt 0)

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



That all depends on exactly how the server is set up, and the location of the code that is doing the rewriting.

If you are rewriting in .htaccess, and all "addon domains" share this .htaccess file, then the code in that file will have to be made "domain sensitive" by testing the requested HTTP_HOST before rewriting. The basic element is:


RewriteCond %{HTTP_HOST} ^www\.example\.com

where "www\.example\.com" is your domain with literal periods escaped as shown.

How you would then use the result of this test depends on exactly what you are trying to do with the rewrites.

Jim
[edit] Speling. [/edit]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month