| | |||||||
|
Welcome to the YD Scuba forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact support. |
| Technology: Discuss Anyone any good at lighttpd config? specifically url.rewrite in the Non-Diving Related Forums forums: I've been trying to find examples/documentation on url.rewrite and failing, can't get my head round what should be simple (I ... |
| | LinkBack (2) | Thread Tools | Display Modes |
| ||||
| Anyone any good at lighttpd config? specifically url.rewrite I've been trying to find examples/documentation on url.rewrite and failing, can't get my head round what should be simple (I think...) current line for the site in lighttpd.conf is url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "index.html/$1" ) which is fine for the root page, however I have a separate subfolder which has index.php rather than index.html, I'd like to be able to go to www.domain.com/folder/ and have it server the relevant index.php, it doesn't and I have no idea how to get it to do so! Heeeelp Danny |
| |||
| have you got something along the lines of server.indexfiles = ( "index.html", "index.htm") in the .conf file? J.
__________________ What were the skies like when you were young? Pick it Pack it Fire it up, come along... |
| ||||
| Quote:
url.rewrite = ( "^/subfolder/$" => "subfolder/index.php", "^/$" => "index.html", "^([^.]+)$" => "index.html/$1" ) gives me it working on www.domain.com/subfolder/ but not on www.domain.com/subfolder (Note the extra / at the end) Nearly there.... Danny |
| ||||
| Quote:
Easiest way I suppose would be just to have two rules: url.rewrite = ( "^/subfolder/$" => "subfolder/index.php", "^/$" => "index.html", "^([^.]+)$" => "index.html/$1" ) url.rewrite = ( "^/subfolder$" => "subfolder/index.php", "^/$" => "index.html", "^([^.]+)$" => "index.html/$1" ) ??
__________________ http://www.evilprofessor.co.uk "Your body goes to waste every minute you don't give it to me..." - Electric Six SS08 - It Begins... |
| ||||
| Quote:
No problem with using two statements (as long as it works the same!) I'll give it a go All help rewarded with greens!!!! Danny Last edited by DannyB : 11-12-07 at 08:08 PM. Reason: Mistake |
| ||||
| Look up RegEx, hard stuff, find examples much easier
__________________ http://www.evilprofessor.co.uk "Your body goes to waste every minute you don't give it to me..." - Electric Six SS08 - It Begins... |
| ||||
| Quote:
url.rewrite = ( "^/subfolder[/]?$" => "subfolder/index.php", "^/$" => "index.html", "^([^.]+)$" => "index.html/$1" ) I must admit I don't know this httpd though and the second of your original rule puzzles me a bit. The first seems to be replacing a request for the root of your site with index.html which is fair enough, but the second seems to shift requests for any paths to be index.html/whatever which seems odd. E.g. "/subfolder/" becomes "index.html/subfolder/" Anyway, give it a try and see if it works |
| ||||
| Quote:
As for the second bit, no idea what it does was set like that by default. Regards, Danny |
| ||||
| Quote:
Can you PM me the full config and I'll see if I can spot anything? |
| Thread Tools | |
| Display Modes | |
| |
| LinkBack to this Thread: http://www.yorkshire-divers.com/forums/technology/64867-anyone-any-good-lighttpd-config-specifically-url-rewrite.html | ||||
| Posted By | For | Type | Date | |
| technology » Blog Archive » Anyone any good at lighttpd config? specifically url.rewrite | This thread | Pingback | 11-12-07 08:39 PM | |
| technology » Blog Archive » Anyone any good at lighttpd config? specifically url.rewrite | This thread | Pingback | 11-12-07 08:39 PM | |
| | ||