Forum Moderators: phranque

Message Too Old, No Replies

Redirection based on referrer

How to?

         

majjk

9:17 pm on Jul 15, 2008 (gmt 0)

10+ Year Member



Is it possible to do the following in htaccess:

1. check if referrer is thatdomain.com
2. check if the page they ask for is mypage1.php
if (1) and (2) is true, then redirect to mypage2.php

I'm stuck with apache 1.3.x, so that might limit my options... ideas?

g1smd

9:44 pm on Jul 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, you'll need one or more lines of RewriteCond and a RewriteRule to follow.

There's a couple of thousand prior posts in this forum, many with code snippets very similar to what you need to do.

Experiment on your dev server, and post your best effort code back here if you get stuck.