Whats wrong in this mod rewrite code

Discussion in 'Apache' started by Bohra, Mar 20, 2009.

  1. #1
    One of my friend is facing some issues with this code

       RewriteEngine on
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    Code (markup):
    Whats wrong in this code ??
     
    Bohra, Mar 20, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Any help is appreciated ??
     
    Bohra, Mar 20, 2009 IP
  3. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First of all you are using a wildcard to match anything on your second rewrite, imo bad :(
     
    Lpe04, Mar 20, 2009 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    Whats the solution ? if i remove last line i dont get an internal error
     
    Bohra, Mar 20, 2009 IP