Hi everyone and happy new year.
Hoping for a bit if help with this problem.
What I am trying to do is pass a variable to another page via onclick.
I have got this working except for when redirecting with htaccess.
It goes like this:
The visitor clicks a link to access a page, htaccess looks to see if the visitor has a valid cookie, if not, they are redirected to another page.
Redirection is carried out ok, but the variable is not passed or carried through to the redirected page.
Below is the relevant script and what I've tried so far.
Link script.
<a href="#" onmouseover="winopen(event,'flindex/fltemplate.html')"
onclick="window.open('http://somesite.com/html/page1.html?message=hello');">Link to file</a>
The call on page1 (which works but not when htaccess redirects)
<?php echo $_GET['message']; ?>
htaccess script
RewriteEngine On
RewriteCond %{HTTP_COOKIE} !name=500aa031ef1d5184c3b3ec821b5533de
RewriteRule .*
http://somesite.com/html/otherpage.php [L]
What I've tried so far but none of them work
RewriteRule .*
http://somesite.com/html/otherpage.php [L,QSA]
RewriteRule .* http://somesite.com/html/otherpage.php/$1 [R=301,L]
RewriteRule .* http://somesite.com/html/otherpage.php?id=$1 [L]
RewriteRule .*
http://somesite.com/html/otherpage.php[R=301,L,QSA]
Cheers all.
Rayo