Finally… after ages of looking around I found the fix for something we were trying to do for our business facebook adverts. We basically wanted to refer all vistors who come from our facebook adverts to a specific special offers page (facebook.php) Find a quote below of how to do it
Here is the code to check your web server referer and then redirect the visitor to your custom sales page. Simply take the two lines of code and put them in your
.htaccessfile and you’re done.
RewriteCond %{http_referer} ^http://([^.]+\.)*(facebook)\.com
RewriteRule ^$ facebook.php [R=302,L]In this example, we look for referer’s from
facebook.comand we direct them to a page on our site called facebook.phpYou should change the domain and the page to anything you like.NOTE: You need to have the apache module
mod_rewriteinstalled on your web server.









The power of the htaccess file is unlimited when it comes to redirecting… not to mention mod_rewriting for urls.
Hi, Can i take a one small picture from your site?
Thanks
SuperSonic