I really have no knowledge as far as Apache/.htaccess/rewrites go... what I want to do is: http://page.com/?redir=x - Replacing x with any URL, automatically redirects the page to that URL... for example: http://page.com/?redir=http://website.com/ will take you to website.com. Doing this will set the referer from all redirects to http://page.com/?redir=x, correct?
If you do a 301 redirect it should keep the original referrer. Try: RewriteCond %{QUERY_STRING} ^redir=(.+)$ RewriteRule ^$ %1? [R=301,L] Code (markup):
I'm trying not to keep the referer, but when I try this in my .htaccess and go to http://www.domain.com/?redir=http://www.google.com/, it doesn't take me to Google, it takes me to that raw URL.
It works on my end. Is there an actual file you're using, such as: http://www.domain.com/somepage?redir=http://www.google.com/ or is it just http://www.domain.com/?redir=http://www.google.com/ The http:// also has to be in the redirect for it to work.
http://www.domain.com/?redir=http://www.google.com/ There is no index.php. There doesn't have to be though, right?