Link to home
Start Free TrialLog in
Avatar of MAVERICK
MAVERICKFlag for United States of America

asked on

Apache mod_rewrite question - Round 2

Avatar of MAVERICK
MAVERICK
Flag of United States of America image

ASKER

Hi Everyone,

I used the following rule which half works - i still can't pass the msg part of the query string.

RewriteCond %{QUERY_STRING} name=(.*)
RewriteRule ^signuperror.htm /page.php?p=signuperror&name=%1&msg=1 [P,L]
RewriteCond %{QUERY_STRING} email=(.*)
RewriteRule ^signuperror.htm /page.php?p=signuperror&email=%1&msg=2 [P,L]

Cheers!
Maverick
Maverick,

I am not an expert in mod_rewrite, but the "%1" looks strange... isn't it suppose to be $1 ?
Hi Samri,

Apparently not - $1 refers to terms in the URL not the query string.

Here is the 'round 1' question
https://www.experts-exchange.com/questions/21002207/Apache-mod-rewrite-question.html

Cheers!
-John
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry about the delay

Will confirm ahoffmans' suggestion and get back to you ASAP

Maverick
I've been having unrelated issues on my development server & time contraints that prevented me from fully evaluating ahoffman's solution. I believe it was basically correct, there was just some further issues that prevented me from fully perfecting the rewrite rules required (& why i didn't originally accept the answer)

I decided to give ahoffam the points and close the question.

Maverick