views:

396

answers:

1

How does the lighttpd rewrite work for folowing?

http://example.com/file_46634643.jpg to http://sub.domain.com/46634643.jpg

If it's possible...

+2  A: 

Yes, it is possible. Use mod_rewrite, here is an example:

url.rewrite-once = ("^/file_([0-9]+\.jpg)$" => "/$1")

Check Lighttpd's mod_rewrite documentation for more details.

Bartosz