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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -