isapi-rewrite

Can I do an if/then/else in htaccess?

倖福魔咒の 提交于 2019-11-28 03:41:59
问题 I have a site that serves up certain content based on the subdomain. So it is the same set of files, and maybe the header and some info in the site pages changes based on the subdomain. I need to have different htpassword authentication based on the subdomain as well, but can't find info on how to do an if/then type of thing in htaccess . Basically what I need is this: if subdomain = 'abc' use this htpassword file if subdomain = 'def' use this htpassword file Can this be done? 回答1: Try