CodeIgniter Forums
I'm stuck with Lighttpd and CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: I'm stuck with Lighttpd and CI (/showthread.php?tid=44964)



I'm stuck with Lighttpd and CI - El Forum - 09-02-2011

[eluser]Unknown[/eluser]
Hello !

I'm stuck today with Lighttpd and CI. My own small-server stand after router and is accesible via (example):

http://someserver.dyndns.info:1234/

My CI projects lays in /codeigniter directory:

http://someserver.dyndns.info:1234/codeigniter/proj1/
http://someserver.dyndns.info:1234/codeigniter/proj2/
http://someserver.dyndns.info:1234/codeigniter/proj3/


but always get 403 error after try to visit. Is here somebody, who can help me with config for mod_rewrite in lighty ?

Here is some of my lighttpd.conf:
Code:
# Mod rewrite for Codeigniter projects - won't work :/
# Copy&paste; from: http://codeigniter.com/wiki/Rewrite_with_lighttpd/

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

My server is Debian. please, help Sad


//edited: 02.09.2011 18:10

Few hours of searching, and still no results. Now, my lighttpd code for CI project1 looks like this:
Code:
$HTTP["url"] =~ "^/proj1/" {
        alias.url = ( "/proj1/" => "/var/www/codeigniter/proj1/" )
        url.rewrite-once = (
                "/proj1/(.*)\.(.*)" => "$0",
                "/proj1/(css|files|img|js|stats)/" => "$0",
                "^/proj1/([^.]+)$" => "/index.php/$1"
        )
}

This config won't work, gives 404 :/