[Solved] 404 if no trailing slash
I'm new to Lighttpd, and I faced a problem.
I know that a trailing slash tells the webserver to search a directory, while no slash means to search a file. But as I thought, all servers go to directory if there's no file with such a name.
Is there any method to configure Lighttpd to open directory correctly even if there's no trailing slash in the address?
I'v searched this forum, found this https://redmine.lighttpd.net/boards/2/topics/5536 but in fact it's not exactly what I need.
Thank you. =================
UPD: I have an i/ directory in document-root, and it opens well both as http:.../i/ and http:.../i
zabbix direcory is an alias:
alias.url = ( "/zabbix/" => "/usr/share/zabbix/" )
I think it's because of this. Do I need some regexp in my alias configuration?
UPD: I removed trailing slash in alias configuration and now it's OK :-) thanks.
alias.url = ( "/zabbix" => "/usr/share/zabbix/" )
RE: [Solved] 404 if no trailing slash - Added by gstrauss 7 months ago
Yes, that is one workable solution (and the recommended solution for the common case).
Another alternative: if /zabbix-abc123 is also valid, then the original alias.url would be used and you can set up a mod_redirect rule to explicitly redirect from "/zabbix" to "/zabbix/"