What is wrong with my RewriteRule (Remove a question mark)

Discussion in 'Apache' started by mk1336, Aug 27, 2008.

  1. #1
    What is wrong with my RewiteRule?

    RewriteEngine On
    RewriteRule ^List/?(.*?)&time=([^&]+) List/$1.php?time=$2

    I want to remove question mark(?) after List/ :

    http://mydomain.find.com/List/?variableName.php?time=variables

    redirect to:

    http://mydomain.find.com/List/variableName.php?time=variables

    Thanks,
    MK
     
    mk1336, Aug 27, 2008 IP
  2. nimhost

    nimhost Active Member

    Messages:
    235
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    nimhost, Aug 28, 2008 IP
  3. mk1336

    mk1336 Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply.
    It did not work.
    This is the out put of rewrite log file:
    applying pattern '^List/(.*?)&time=([^&]+)' to uri '/List/'

    Should not I use RewriteCond %{QUERY_STRING}?
    Thanks for your help.

    MK
     
    mk1336, Aug 28, 2008 IP