This one is made for UCJ
---
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/cgi-bin/ucj/c.cgi$
RewriteCond %{HTTP_COOKIE} !^ucjc=.+$
RewriteRule .* http://www.somewhere.com/ [R,L]
---
1. It makes sure that the accessed file is the out script
2. It makes sure there's an empty/non existant ucjc cookie
If you want to redirect to what ever you have in url=, good if you want to send all nocookie traffic to your galleries and not yur trades.
---
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/cgi-bin/ucj/c.cgi$
RewriteCond %{HTTP_COOKIE} !^ucjc=.+$
RewriteCond %{QUERY_STRING} p=[^&]+
RewriteCond %{QUERY_STRING} url=([^&]+)
RewriteRule .* %1? [R,L]
RewriteCond %{REQUEST_URI} ^/cgi-bin/ucj/c.cgi$
RewriteCond %{HTTP_COOKIE} !^ucjc=.+$
RewriteCond %{QUERY_STRING} !p=[^&]+
RewriteCond %{QUERY_STRING} ^$ [OR]
RewriteCond %{QUERY_STRING} url=[^&]+ [OR]
RewriteCond %{QUERY_STRING} link=[^&]+
RewriteRule .* http://www.yoursite.com/? [R,L]
---
First parts checks if there's an url= and p= present (then it's most likely a gallery link). It redirect to what ever is in url=
Second parts checks if the link looks like this....
/cgi-bin/ucj/c.cgi
/cgi-bin/ucj/c.cgi?url=something
/cgi-bin/ucj/c.cgi?link=something
If it does, it redirects to http://www.yoursite.com/
|