mod_rewrite: Different rules on different domains, same www-root
        Posted  
        
            by Johan
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Johan
        
        
        
        Published on 2010-06-08T09:16:25Z
        Indexed on 
            2010/06/08
            9:22 UTC
        
        
        Read the original article
        Hit count: 316
        
I have 8 domainnames that point to the same www-root. If the main domain is accessed, you are pointed to index.php, and from there on, the URL's are like: index.php?p=contact etc. If, however, you access one of the other 7 domains, that point to different units, you are initially pointed to: index_local.php, and from there on it goes like: index_local.php?p=contact etc.
As you may see these URL's are very ugly, can I use mod_rewrite in this scenario to make it so that index.php AND index_local.php never show up in URL? Is there any better way to do this than the way I'm pointing the user now with multiple domains in the same www-root?
© Stack Overflow or respective owner