I have an old website – written in asp. The contact form uses a querystring to decide which form the visitor sees.
If a vistor wishes to just contact me, they may do so by clicking the link to:
http://example.com/contact.asp
If they wish to submit a fault – they do so by clicking the following link
http://example.com/contact.asp?problem=true&.......
Additional parameters are also passed after problem nb: ?problem=true&Customer... – however, I only need to know if problem=true
In the new site I have two pages: contact.html, and help.html
When a visitor goes to contact.asp they are redirected to contact.html – thanks to the following redirect rule:
RewriteRule ^contact\.asp$ http://example.com/contact-us.html [R=301,L]
However, I am having MASSIVE problems trying to get
http://example.com/contact.asp?problem=true to redirect to help.html
I’ve found tons of examples – but none of them work.. the page always redirects to contact.html
I have even commented out the above rewrite rule to see if my problem=true rule was being over-ridden…. This returned a 404. My problem=true rule just doesn’t work.
I’ve been following examples such as: http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects
So to recap, I’d like to redirect contact.asp?problem=true to help.html, and contact.asp to contact.html
Many thanks in advance,
Rob
Not sure what you have tried as far as matching the query string, but the following should work.
Hope that helps.