$_GET form type and mod_rewrite

Discussion in 'Apache' started by Scorpiono, Jul 29, 2008.

  1. #1
    Hello,

    www.mysite.com/search/keyword (mod_rewrite, and it works)
    www.mysite.com/search.php?search=keyword (main)

    but I have a form, action="search.php" - and basically it will show the .php one when I submit and not the re-written one - how should I redirect it ?

    Thank you kindly
     
    Scorpiono, Jul 29, 2008 IP
  2. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #2
    You can't.

    Maybe if you could implement some javascript in your form, which would ,instead of submitting the form results, maybe it could refresh the page on your rewritten URL implementing inputted keyword... but this is just an idea...
     
    pr0t0n, Aug 1, 2008 IP
  3. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #3
    I can, fixed it,you need Rewritecond %{QUERY_STRING}
     
    Scorpiono, Aug 1, 2008 IP
  4. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #4
    ah nice! I though it couldn't be done, didn't remember that ;)
     
    pr0t0n, Aug 1, 2008 IP