Google Answers Logo
View Question
 
Q: Apache Mod Rewrite Function ( No Answer,   0 Comments )
Question  
Subject: Apache Mod Rewrite Function
Category: Computers > Software
Asked by: smcwilliams-ga
List Price: $75.00
Posted: 16 Jul 2003 18:42 PDT
Expires: 17 Jul 2003 07:53 PDT
Question ID: 231858
What is the exact function for Apache's ModRewrite to translate a url
such as:

http://myserver/retrieve/parameter1/1/parameter2/10/parameter8/sometext

into

http://myserver/retrieve.cgi?parameter1=1&parameter2=10&parameter8=sometext


The logic is that in the first url, the parameter name is whatever
follows retrieve and the parameter value is whatever follows the
parameter name.
The parameter name may contain either text or numbers and be of almost
any length.
The parameter values may contain either text or numbers and be of
almost any length.
The parameter names may appear in any order - that is parameter1=1 may
appear after parameter8
The order will always be
...retrieve/parametername/parametervalue/parametername/parametervalue/...
 You will never have /parametername/parametername/parametervalue or
something like that.
No parameter name is guaranteed to appear every time.
There will never be two parameters with the same name in the url.
The name retrieve.cgi will not change.
Both of the 2 URL formats above must work.  Sometimes URLs will be
received in the first format, sometimes in the second.
The urls submitted may or may not end with a /

Request for Question Clarification by sycophant-ga on 17 Jul 2003 06:35 PDT
Hi, 

I have made a definate start on this and have been trying a few things
for an hour or so. It certainly isn't as easy as it seems.

Are you willing to use an external program (in perl or bash maybe)
called via the Rewrite mechanisim to do the rewriting?

Unfortunatly, the demands of sleep and work mean I can't experiment
anymore this evening, but if the question remains when I return, I
will continue my work.

Regards,
Sycophant-ga

Clarification of Question by smcwilliams-ga on 17 Jul 2003 07:01 PDT
The answer needs to only use the Mod_Rewrite mechanism, not call an
external program.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy