This example describes the CodeIgniter method for LIGHTTPD server URL overrides. Share to everyone for your reference. The implementation method is as follows:
Since the development environment uses the LIGHTTPD server, my native environment uses the Apache configuration, which causes all the link addresses to jump to the first page after deployment to the development machine.
Analysis of the next, Index.php/controller/function, controller does not take effect, should be the reason for routing distribution.
To configure a URL rewrite rule for a lighttpd configuration:
Url.rewrite-once = ("/(. *) \. (. *) "= +", "/(css|files|img|js|stats)/" = "+", "^/([^.] +) $ "="/index.php/$1 ")
Another Apache URL rewrite rule is attached:
Proxypreservehost on documentroot "D:/program files/xampp/htdocs/xxx" ServerName xxx.baidu.com DirectoryIndex index.php
Options Indexes followsymlinks allowoverride all Order Allow,deny allow
from all
Restart LIGHTTPD service, ok!
I hope this article is helpful to everyone based on CodeIgniter PHP program design.