Link to home
Start Free TrialLog in
Avatar of coolguy2009
coolguy2009

asked on

Htaccess help

We have an URL rotator script that grabs a random URL from a text file in the same directory. So when a visitor clicks on a link, they will get redirected to the randomly chosen URL.

Now we want to pass a variable along with the chosen URL, like this:

1) Visitor arrives at our site such as
http://www.oursite.com?variable=THEVALUE

2) Visitor clicks on a link on our page to
http://www.oursite.com/randomurlscript

3) Random link is chosen and visitor is redirected to:
http://externalwebsite.com?somevariable=THEVALUE


We'd like to do this as simply as possible, so if there is an .htaccess solution that might be best, or a session/cookie solution or else you can modify the randomurl script. We are also open to using a new randomurl script if that's easier. All it needs to do is allow us to enter multiple URLs to choose from, and then append the variable as previously described.
ASKER CERTIFIED SOLUTION
Avatar of Phatzer
Phatzer
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial