homepage Welcome to WebmasterWorld Guest from 54.234.42.16
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library : Charter : Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess interfering with addon domain
is this normal?
humpo




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

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

 

jdMorgan




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

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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved