lighthttpd rewrite rule

Discussion in 'Site & Server Administration' started by Sifro, Oct 10, 2009.

  1. #1
    Hello everybody,

    i have this rewrite rule that directs all the requests to the index.php page, provided that an exact match with a js,ico,gif,jpeg,png,css or php file is NOT found.

    url.rewrite-once = (
    ".*\?(.*)$" => "/index.php?$1",
    ".*\.(js|ico|gif|jpg|png|css|php)$" => "$0",
    "" => "/index.php"
    )

    The problem is: if i type in my address bar mysite.com/mypage.php, it works ok, but if i type mypage.php?someVar=someValue, it doesn't work anymore (index.php is called instead of mypage.php)... Can you help me to get it working?

    THanks!
     
    Sifro, Oct 10, 2009 IP