Simple question but, how to redirect all requests to a page using htaccess? I want the url to look like this: www.domain.com/dir/?u=1&p=2 and redirect to: www.domain.com/dir/page.php?u=1&p=2 Thanks.
I think my message was not clear, sorry. I am making an email magazine and I want to use URLs in the email to look like this: www.domain.com/dir/?u=1&p=2 When they click the link, apache should somehow use this page to process: www.domain.com/dir/redirect_script.php?u=1&p=2 and that will fetch the real url from the key in $_GET['u'] to redirect the user to the real url: www.domain.com/amazing-page.html Question: how to get apache to use 'redirect_script.php' in this example?
PS: I think the solution is to put a htaccess in /dir/ that redirects everything to redirect_script.php, but I don't know what command to use in the htaccess.