lighttpd forum migration > RewriteCond used to see if file exists

Posted by Andrew MacCormack (Guest)
on 17.03.2008 09:59
On my apache site, I had some zip files in the root dir and some tidied 
away in a subdir. Some extant links exist on the interweb to the 
untidied locations (in root) and I can't get the all updated, so I did 
this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9_-]+).zip$ modules/$1.zip [L]



But I can't seem to see a way to do this in lighttpd. Can anyone help? I 
can't just rename all references to zips in the root to modules, as 
there are still some in root, rather than modules.
Posted by Bruno Baketaric (Guest)
on 02.05.2008 11:03
Hi Andrew,

take a look at this page:
http://nordisch.org/2007/2/6/drupal-on-lighttpd-with-clean-urls
and modify the LUA Script to match your needs.

Bruno

Andrew MacCormack wrote:
> On my apache site, I had some zip files in the root dir and some tidied 
> away in a subdir. Some extant links exist on the interweb to the 
> untidied locations (in root) and I can't get the all updated, so I did 
> this:
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^([A-Za-z0-9_-]+).zip$ modules/$1.zip [L]
> 
> 
> 
> But I can't seem to see a way to do this in lighttpd. Can anyone help? I 
> can't just rename all references to zips in the root to modules, as 
> there are still some in root, rather than modules.