I have two web servers; one with this entry in /etc/lighttpd/lighttpd.conf:
url.rewrite-once = ( "^/d[A-Z-O][a-z-l][0-9a-f]{2}d{3}$" => "/index.php${url.path}${qsa}" )
I’m using version 1.4.55 on that server:
/home/ubuntu# lighttpd -v
lighttpd/1.4.55 (ssl) - a light and fast webserver
And the same version on the other server. When I copy the “url.rewrite-once” rule to the other server’s /etc/lighttpd/lighttpd.conf file, the rule isn’t being executed. I confirmed both servers have these modules enabled:
server.modules = (
"mod_redirect",
"mod_rewrite"
)
But I keep getting a “404 not found” error on the second server. I even see an entry in the logs for the failed page load attempt, showing that my rewrite rule isn’t being followed:
[07/May/2024:00:13:52 +0000] "GET /4Vhda346 HTTP/1.1" 404 345 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15"
Can anyone assist? Thanks!
I tried copying the same url.rewrite-once rule from one server to another and nothing seems to be working on the second server.