Redirect traffic from Facebook to specific page using .htaccess? -


i'm trying redirect traffic coming facebook specific page. in .htacess file have:

rewritecond %{http_referer} ^http://(www\.)?facebook\.com rewriterule ^$ /wouldyouratherquestions.php [l] 

but doesn't seem working. i'm new .htacess, doing wrong here?

your rewritepattern ^$ matches homepage only, if want redirect requests ,change ^$ ^(.*)$ in pattern :

rewritecond %{http_referer} ^https?://(www\.)?facebook\.com rewritecond %{request_uri} !^/wouldyouratherquestions.php  rewriterule ^(.*)$ /wouldyouratherquestions.php [l] 

rewritecond %{request_uri} !^/wouldyouratherquestions.php condition rule avoids rewriting destination itself.


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -