Search code examples
urlurl-rewritinglighttpd

lighttpd mod_rewrite url


My htaccess sample:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^login$ index.php
ErrorDocument 500 /login

When i tried with url.rewrite:

url.rewrite = ("^login$" => "index.php")

It failed. Anything missing here?

lighttpd.conf:

server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
   "mod_rewrite",
    "mod_scgi",
)

url.access-deny             = ( "~", ".inc" )
url.rewrite-once = ( "^login$" => "index.php" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

Solution

  • Try this : url.rewrite-once = ( "^login$" => "index.php" )