1

I have an issue with Lighttpd Rewrite and static files.

Here is my rewrite syntax:

url.rewrite = (
    "^/(.*)\.(php|css|js|jpg|png)$" => "$0",
    "^/(.+)$" => "/router.php?url=$1"
)

All .css and .js files load up just fine but no images load up. I have attempted check if the file is being served from /images but that does not fix the issue. I checked the access logs and all css and js files have a 200 status but all image files have a 404. The paths are correct.

Does anyone have an idea why the .css and .js files would load properly but images do not.

1
  • Instead of url.rewrite, try url.rewrite_once; and also check the extensions of your images Feb 24, 2011 at 16:10

1 Answer 1

1

If you change url.rewrite = to url.rewrite-if-not-file = this may fix the issues you are having.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .