Mod rewrite help

Discussion in 'Apache' started by phpbilly, Jun 21, 2010.

  1. #1
    Hi,

    I was wondering if anyone could help, I have have a javascript dropdown that posts the variable directly in the url and I use the following modrewrite rule:

    RewriteEngine on
    RewriteRule ^test/([^/\.]+)/?$ page.php?variable=$1 [L]

    This works fine. But when I now need to tackle the issue of when javascript is turned off, so I am using the get method and the following is in the url:

    http://localhost/site/test/?id=example1&submit1=submit

    I have tried unsuccessfully to write a modrewrite rule that would read

    http://localhost/site/test/example1

    in the browser and wondered if anyone could help?

    Many thanks,

    Bill
     
    phpbilly, Jun 21, 2010 IP
  2. luckyjazzbo

    luckyjazzbo Member

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    I don't really understand your problem but may be you need to set correct RewriteBase. In your case: "RewriteBase /site/"
     
    luckyjazzbo, Jun 22, 2010 IP