Welcome Guest, Not a member yet? Register   Sign In
ModRewrite for Lighttpd?
#1

[eluser]Philip Pryce[/eluser]
Does anyone have a clue how to make ModRewrite work in Lighttpd, i've got the module installed, but i'm not sure how to layout the .htaccess file.
I'm also not the greatest with Regular Expressions, so if someone could translate the default Apache 2 one into a Lighttpd one that would be amazing.

Thanks, Phil
#2

[eluser]Tom Glover[/eluser]
I think they are the same, as far as I know Lighttpd can read Apache .htaccess and certain other modules.
#3

[eluser]Philip Pryce[/eluser]
it seems it isnt the same, i've tried it and it doesnt seem to work.
any one got any ideas?
#4

[eluser]Philip Pryce[/eluser]
right well i've translated the main rules into a lighttpd form,
Code:
url.rewrite   = ( "^(.*)$"  =>  "/index.php/$1" )
but this doesnt include the part of the rewrite which checks if the requested url is a folder or a file, so currently my CSS is broken which isnt good. any ideas how to translate that into a lighttpd style?
#5

[eluser]Michael Wales[/eluser]
Here is a Google Cache (yay) copy of an article on my blog before it bit the dust:

Running a CodeIgniter Application on Lighttpd

Basically, you force all 404's to go to your apps index.php which will then route it properly. CI tosses headers for real-world 404's so you don't have to worry about Google or any other search engine penalizing you for it either.
#6

[eluser]Philip Pryce[/eluser]
thank you so much, thats a vey concise and informative blog entry. thanks.




Theme © iAndrew 2016 - Forum software by © MyBB