CodeIgniter method for lighttpd server URL rewriting. CodeIgniter method for lighttpd server URL rewriting because the development environment uses the lighttpd server, and my local environment uses Apache configuration, resulting in deployment to the development machine, all CodeIgniter methods for lighttpd server URL rewriting
Because the development environment uses the lighttpd server and the Apache configuration is used in my local environment, after deployment to the development machine, all the link addresses will jump to the home page.
According to the analysis, the index. php/controller/function does not take effect. it should be due to route distribution.
Configure the url rewriting rule configured by lighttpd:
1 2 3 4 5 |
Url. rewrite-once = ( "/(. *) \. (. *)" => "$0 ", "/(Css | files | img | js | stats)/" => "$0 ", "^/([^.] +) $" => "/Index. php/$1" ) |
Appendix: Apache url rewriting rules:
1 2 3 4 5 6 7 8 9 10 11 12 |
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 the lighttpd service. OK!
Because the development environment uses the lighttpd server, my local environment uses Apache configuration, resulting in all...