Regex help. Lighttpd rewrite rule

后端 未结 1 1160
抹茶落季
抹茶落季 2021-01-25 17:12

I am not very familiar with Regular expression, but I am asked to modify a lighttpd rewrite rule.

url.rewrite = (
    \"^/(.+)/?$\" => \"/index.php/$1\"
)


        
相关标签:
1条回答
  • 2021-01-25 17:42

    You probably want to use a negative lookahead. Something like

    "^/(?!statistics)(.+)/?$" => "/index.php/$1"
    

    And then you'll need an additional rule for statistics

    0 讨论(0)
提交回复
热议问题