.htaccess redirect, from old dirty URL to a clean new URL with parameters

Posted by JustAnil on Server Fault See other posts from Server Fault or by JustAnil
Published on 2012-10-19T15:38:50Z Indexed on 2012/10/19 17:04 UTC
Read the original article Hit count: 221

Filed under:
|
|

I have the following 2 links, I'm not great with .htaccess rules yet.

Old URL: http://www.mywebsite.org.uk/donate/donate.php?charity_id=885&project_id=18111
New URL: http://new.mywebsite.org.uk/donation/to/885/18111

I want all the traffic coming from the old URL to the new url (including the parameters charity_id & project_id).

I'm trying to learn .htaccess rules, but finding the tutorials online to be kinda vague.

I'd really like a simple explanation on the .htaccess rules.

(Give a man a fish, feed him for a day, teach a man to fish, feed him for a lifetime).

The correct answer will be the answer with a simple and useful explanation (along with the rules if possible!).

© Server Fault or respective owner

Related posts about .htaccess

Related posts about redirect