Enabling "Pretty URLs" on Lighttpd-based c5
Permalink
I've decided to run a c5 project on lighttpd instead of Apache. I really wanted to 'Enable Pretty URLs', but got stuck on the issue of translating the Apache rewrite snippet provided when you check the option in Dashboard >> Sitewide Settings >> Linking.
After several dead-ends in researching the issue, I think I've got it. For reference, I'm using:
It works so far. Still, I'd be curious (and very appreciative) to hear from anyone who sees potential problems with it. Thanks.
After several dead-ends in researching the issue, I think I've got it. For reference, I'm using:
url.rewrite = ( "^/(.+)/?$" => "/index.php/$1" )
It works so far. Still, I'd be curious (and very appreciative) to hear from anyone who sees potential problems with it. Thanks.
You're right. Just caught that. Although it seems to be affecting some files and not others. Most images are OK, but a few aren't. PDFs/DOCs aren't.
Anyone have an idea about how to translate those Apache "RewriteCond" conditions provided by c5 for lighttpd?
If I can't hang on to lighttpd, I guess it's OK. The SEO/usability aspect of this site is more important.
Thanks.
Anyone have an idea about how to translate those Apache "RewriteCond" conditions provided by c5 for lighttpd?
If I can't hang on to lighttpd, I guess it's OK. The SEO/usability aspect of this site is more important.
Thanks.
url.rewrite = ( "^/([^.?]*)$" => "/index.php/$1" )
Working at all 100%. :>
Adding a few lines of code to index.php to use $_SERVER['REQUEST_URI'] allows concrete5 to be setup as the error handler in lighttpd.
Then in your lighttpd config:
Pretty easy and much less mess to sort out.
Then in your lighttpd config:
server.error-handler-404 = "/index.php"
Pretty easy and much less mess to sort out.
like: /files/mypicture.jpg
there should be a condition imho. lighttpd might do this somewhere else, but if not, you should probably add it..