Showing different embed template based on referrer
Posted: Thu Aug 09, 2018 11:52 am
Ok, let's say traderA.com visits the index page of my tube site, how can I show them a different video/embed page template once they click through the site to those pages? Normally once they hit the index and then to the category > video pages the referrer is now own domain, not the original ref. I'm pretty certain this could be done somehow with htaccess.
I've used referrer checking before to show a different template on a page like this:
Would just love to be able to do that with the video pages too. I thought maybe something like this could work:
Any ideas?
I've used referrer checking before to show a different template on a page like this:
Code: Select all
RewriteCond %{HTTP_REFERER} traderA.com [OR]
RewriteCond %{HTTP_REFERER} traderB.com [OR]
RewriteCond %{HTTP_REFERER} traderC.com
RewriteRule ^index.php$ new.php [L]Code: Select all
RewriteCond %{HTTP_REFERER} traderA.com
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^video/([^/]+)/index.html$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&slug=$1&force_template=embed2 [L]
RewriteRule ^video/([^/]+)/index.html$ /scj/tube/?slug=$1&force_template=embed2 [L]
RewriteRule ^video/([^/]+)/$ /scj/tube/?slug=$1&force_template=embed2 [L]
RewriteRule ^video/([^/]+)/([0-9]{1,2}).html$ /scj/tube/?slug=$1&item_id=$2&force_template=embed2 [L]