M3Server Technical Blog FAQ howto redirect source traffic htaccess

howto redirect source traffic htaccess



Need to redirect source traffic to another domain?  Well, if you can’t modify the link on the source traffic, you can control it with the power of htaccess.

WARNING: Make a backup of your original .htaccess file as always.  Backups are GREAT practice to follow.

If something goes wrong, please remove the lines from your .htaccess or restore your known working backup file.

Place the following at the top of your .htaccess file:

The domain names below are just examples, please use the real domains.  The “other-something” domain is the domain you want the traffic routed to.

#### START COPY BELOW THIS LINE #####

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^https://(www|ads)\.source-traffic\.net
RewriteRule .* https://www.other-something.com [R=301,L]

### END COPY ABOVE THIS LINE ###

Enjoy the traffic router!

M3Server.com – Virtual Dedicated Servers Hosting

Leave a Reply