Google Answers Logo
View Question
 
Q: Apache Mod ReWrite Function ( No Answer,   0 Comments )
Question  
Subject: Apache Mod ReWrite Function
Category: Computers > Internet
Asked by: mike98765-ga
List Price: $10.00
Posted: 10 Jun 2003 09:37 PDT
Expires: 10 Jul 2003 09:37 PDT
Question ID: 215609
What is the exact function for Apache's ModRewrite to turn:

http://www.domain.com/pagename.php?apc=variable1&city=variable2

into

http://www.domain.com/pagename/variable1/variable2

Request for Question Clarification by sgtcory-ga on 11 Jun 2003 09:19 PDT
Hello mike,

It's been a while since I tackled mod rewrite, thus the clarification
before submitting this as your final answer. I want to make sure we
get a working rewrite first. Try this and let me know if it works :


RewriteEngine on 
RewriteRule ^([^/]+)/pagename/(.*?)/(.*?) pagename.php?apc=$1&city=$2
[L]

The [L] is simply stating that this is the last rule. If you are
processing more than this rewrite, you can remove it.

Thanks for the clarification -
SgtCory

Request for Question Clarification by sgtcory-ga on 11 Jun 2003 09:20 PDT
The [L] rule should remain on the same line. Our formatting moved it
down one line. Thanks again -

SgtCory

Clarification of Question by mike98765-ga on 11 Jun 2003 12:54 PDT
Thanks, that's very close.  

It works but it turned it into:

http://www.domain.com/pagename.php/Variable1/variable2

Is there a way to remove the .php?

Clarification of Question by mike98765-ga on 11 Jun 2003 12:56 PDT
Correction.  That didn't work at all.  Sorry for the misinformation.

Request for Question Clarification by sgtcory-ga on 11 Jun 2003 13:06 PDT
Did anything at all happen? This might help myself and other
researchers assist you further. Thanks for the update -

SgtCory

Clarification of Question by mike98765-ga on 11 Jun 2003 16:30 PDT
Got a server error and a file not found error.
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