Forum Moderators: phranque

Message Too Old, No Replies

Mod_Rewrite advice Please!

Need mod_rewrite help

         

cayetano25

3:14 am on Mar 17, 2004 (gmt 0)

10+ Year Member



Hi,
I have been trying to setup a working test of mod_rewrite, so far to no avail. I am starting to lose my hair!

I am using a test server, so my url is:
[est...]

I am using a dropdown HTML control and a submit button using the get method.

I would like to achieve:
[est...]

Should I not be using the get method to post the querystring? Is there a better way?

I have tried numerous ways, I have the rewrite logs but it only seems to compare the base file sample.php to th regex:
(ignore the regex below)
strip per-dir prefix: .../htdocs/test/sample.php -> sample.php
applying pattern '^sample/(.*)$' to uri 'sample.php'
pass through .../htdocs/testphp/sample.php

So there you have it.
Thanks in advance for your help! I'll really appreciate it.

closed

4:20 am on Mar 17, 2004 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld, cayetano25!

Pseudo-code (put in .htaccess for the base directory of est):
If REQUEST_URI contains /test/sample.php/(.*), use the value in the buffer to rewrite the address.

cayetano25

5:19 pm on Mar 17, 2004 (gmt 0)

10+ Year Member



I need something more specific... My skillset is not at that level yet.

closed

6:27 pm on Mar 17, 2004 (gmt 0)

10+ Year Member



You can find a beginner's guide to redirecting URLs here [webmasterworld.com].

Other helpful documents on your way to being an mod_rewrite expert :):

mod_rewrite Documentation [httpd.apache.org]
Regular expressions [etext.lib.virginia.edu]