I have two domains on the same server. primary_domain.com and secondary_domain.com. I want http://primary_domain.com => {root}/primary_folder/primary.html http://secondary_domain.com => {root}/secondary_folder/secondary.html Is it possible to use the same .htaccess to handle both domains? I can do it for one domain: primary_domain.com with RewriteCond and RewriteRule, but not for the second domain: secondary_domain.com. Any suggestions? Thanks.
place the htaccess file in {root} so that you don't forget where it's at, then create symlinks pointing to that htaccess file from primary_folder and secondary_folder.
Generally you just place a .htaccess in the root directory for each of the domains. So you would have a seperate .htaccess file. for each
srisen2 is right, you need to copy the .htaccess file to both directories and both domains are mapped to different directories. I think symlink will not work for .htaccess.