regex - htaccess conditional DirectoryIndex based on incoming traffic from certain domains -



regex - htaccess conditional DirectoryIndex based on incoming traffic from certain domains -

i show different index pages surfers coming different domains. set list of domains, incoming traffic should directed index page on site, set list of domains incoming surfers should land on different index page on site, etc... example:

surfer domain1.com, domain2.com, domain3.com should land on indexa.php

surfer domain4.com, domain5.com should land on indexb.php

etc..

help appreciated :-) give thanks you!

you can utilize http_referer header this:

rewriteengine on rewritecond %{http_referer} (domain1|domain2|domain3)\.(com|net|org|info)$ [nc] rewriterule ^/?$ /indexa.php [l,nc] rewritecond %{http_referer} (domain4|domain5)\.(com|net|org|info)$ [nc] rewriterule ^/?$ /indexa.php [l,nc]

regex apache .htaccess mod-rewrite

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -