Get the App
SLTechnology News&Howtos  ›  Development  › 

How to implement CodeIgniter rewriting for lighttpd server URL

Shulou Source: shulou.com Published: 2022-06-03 09:25:48 11月15日 Update

This article introduces the relevant knowledge of "how to implement CodeIgniter for lighttpd server URL rewriting". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The specific implementation methods are as follows:

Since the development environment uses a lighttpd server and my native environment uses Apache configuration, after deployment to the development machine, all link addresses jump to the home page.

After analysis, index.php/controller/function and controller did not take effect, which should be due to route distribution.

Configure url rewriting rules for lighttpd configuration:

Url.rewrite-once = ("/ (. *)\. (. *)" = > "$0", "/ (css | files | img | js | stats) /" = > "$0", "^ / ([^.] +) $" = > "/ index.php/$1")

Additional Apache url rewriting rules are 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 the lighttpd service, ok!

This is the end of the content of "how to implement CodeIgniter URL rewriting for lighttpd server". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Services servers configuration content more environment knowledge rules development practicality learning next dilemma address reality situation articles methods cases editing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Technology vpn NVidia macOS