Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Apache mod_rewrite question - Round 2

Posted on 2004-08-19
8
Medium Priority
?
164 Views
Last Modified: 2010-03-04
0
Comment
Question by:MAVERICK
  • 4
6 Comments
 
LVL 1

Author Comment

by:MAVERICK
ID: 11846688
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
0
 
LVL 15

Expert Comment

by:samri
ID: 11853894
Maverick,

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

Author Comment

by:MAVERICK
ID: 11854132
Hi Samri,

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

Here is the 'round 1' question
http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21002207.html

Cheers!
-John
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 11855527
RewriteCond %{QUERY_STRING} name=(.*)
RewriteRule ^/signuperror.htm\?(.*)$ /page.php?$1
0
 
LVL 1

Author Comment

by:MAVERICK
ID: 12145405
Sorry about the delay

Will confirm ahoffmans' suggestion and get back to you ASAP

Maverick
0
 
LVL 1

Author Comment

by:MAVERICK
ID: 12343478
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

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month5 days, 21 hours left to enroll

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question