homepage Welcome to WebmasterWorld Guest from 54.204.68.109
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Dynamic htaccess
designaweb




msg:4344929
 10:48 am on Jul 28, 2011 (gmt 0)

Dear all,

I have a question, hopefully your answer contradicts my expectations.

5 domains all point to the same directory on my server. Is it possible to load a unique .htaccess file per domain?

 

lucy24




msg:4345187
 9:02 pm on Jul 28, 2011 (gmt 0)

You can't have more than one htaccess file in the same location. But how do the domains get pointed in the first place? Put the htaccesses back there-- or put the equivalent information in the five separate config files if they exist. Do all five domains live on the same server? The wording of the question was ambiguous.

Option B is to include some version of {THE_REQUEST} in each separate set of rules, so users get differently routed depending on what they originally asked for (as distinct from where they are now). I foresee an icky mess in this case.

Deeper, philosophical issue: if you want things to behave differently depending on where the request came from, you may be merging the requests too soon. Put all the domain-specific stuff back in the originating domain, and reserve that final directory for things that will be handled exactly the same regardless of source.

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
© Webmaster World 1996-2014 all rights reserved