|
Re: Feature Request: Flexible Rewrite Rules: msg#00071web.lighttpd
Am Freitag, 17. September 2004 22:26 schrieb Jan Kneschke: > Use 1.3.0 and url.rewrite-final. I´m trying to achieve the following: - Let all requests to images, stylesheets, javascript an text files go through - Let all requests to the directories "forum" and "stuff" go through - Rewrite all other requests to /index.php Well, I´ve not been successful. I´ve created the following rewrite rules: url.rewrite-final = ( "^.*\.(jpg|gif|css|js|txt})$" ) url.rewrite-final = ( "^forum.*" => "/forum/" ) url.rewrite-final = ( "^stuff.*" => "/stuff/" ) url.rewrite-final = ( "^.*$" => "/index.php" ) If I then request "/somedir/" I get a 404 error, although it should have been rewritten to index.php by the last rule, which should match everything that has not been matched before?! If I change the last line to url.rewrite = ( "^.*$" => "/index.php" ) this redirect rule seems to become recursive as my browser never gets a response and I have to "kill -kill <lighttpd pid>" in order to stop the server. If I change the last line to url.rewrite = ( "^.*/$" => "/index.php" ) in order to only match requests with a slash in the end requests to "/somedir/" are correctly rewritten to index.php. But then strangely requests to "/forum/" and "/stuff/" are also rewritten to index.php, although I think they should not be as I´m using rewrite-final to exclude requests to "/forum/" from any further redirect rules. Could someone please enlighten me? The only possible explanation which comes to my mind is that after having passed the rewrite-chain the rewritten URL is again passed through the rewrite chain. If this is the case, how can I disable this behaviour? Steffen |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: 1.3.0 simply exits whereas 1.2.8 works: 00071, Steffen Weber |
|---|---|
| Next by Date: | Re: Feature Request: Flexible Rewrite Rules: 00071, Jan Kneschke |
| Previous by Thread: | Re: Feature Request: Flexible Rewrite Rulesi: 00071, Jan Kneschke |
| Next by Thread: | Re: Feature Request: Flexible Rewrite Rules: 00071, Jan Kneschke |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |