homepage Welcome to WebmasterWorld Guest from 54.161.166.171
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved