Lighttpd rewriting files and directories

Posted by Ronald on Stack Overflow See other posts from Stack Overflow or by Ronald
Published on 2010-04-27T04:07:15Z Indexed on 2010/04/27 4:13 UTC
Read the original article Hit count: 312

I'm trying to do url rewriting with Lighttpd. I have what I need partially working. Right now I have this: http://domain.com/name/a/123 which rewrites to http://domain.com/name/a.php?pid=123

I do this with this rewrite-once rule: "^/name/a/([^/]+)"=> "/name/a.php?pid=$1"

That php page has external resources that are not getting rewritten such as the JavaScript and CSS files. Is there a way I can also have the rewrite do the following?

http://domain.com/name/a/js/file.js => http://domain.com/name/js/file.js

© Stack Overflow or respective owner

Related posts about lighttpd

Related posts about mod-rewrite