📜 ⬆️ ⬇️

CodeIgniter + lighttpd = CNC

image

We have a new project “domen.com”, which will work on the codeigniter php framework and the lighttpd web server.
Task: make beautiful CNC work


CNC support is in CI, but it looks like this: domen.com/index.php/blog/about/
')
Domain directory structure (see picture):
- css - style directory
- img - directory with images
- system - directory with CI

$HTTP["host"] == "domen.com" {
server.document-root = "/www/domen.com/"

url.rewrite-once = (
"^/img/.*/?" => "$0",
"^/css/.*/?" => "$0",
"^(.*)$" => "index.php/$1"
)

}


And now in detail:
"^(.*)$" => "index.php/$1" - all requests will be redirected to the file index.php
example: domen.com/blog/about/ => domen.com/index.php/blog/about/

Requests like domen.com/css/style.css and domen.com/img/pink.jpg will not be redirected

By material: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModRewrite

PS I understand that many will find it trite, but there is very little information on the network on lighttpd, and you will not immediately find it

Source: https://habr.com/ru/post/65408/


All Articles