Rewriting with lighttpd - how to remove file extensions
I would like to use lighttpd's mod_rewrite to allow requests without a specific file extension. For instance, I would like the following mappings to automatically work: Requesting for "/index" would serve "/index.php". "/dir/file" => "/dir/file.php" "/dir/file?args" => /dir/file.php?args" Can this be easily done with a single rewrite rule for a given extension (e.g. ".php")? Cassy and natbro got this very nearly right, but as user102008 commented, this erroneously rewrites any directory index. Adding a url.rewrite-once matching anything ending with a '/' seems to make it work. url.rewrite-once