Mod_rewrite on Alias directory

Posted by crunchline on Server Fault See other posts from Server Fault or by crunchline
Published on 2011-01-13T14:11:47Z Indexed on 2011/01/13 14:55 UTC
Read the original article Hit count: 219

I am moving from a WIMP setup to a WAMP setup. My images are on a separate drive. I need a default image served, when a file is not found. Currently it returns a 404 on images not found in the /images directory, and the 404.jpg is displayed for files not found on all the other directories.

I tried changing [L] to [PT] but that did not do anything.

in httpd.conf

Alias /images "D:/images"

in .htaccess

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^.*\.(gif|jpg|png)$ /404.jpg [L]

© Server Fault or respective owner

Related posts about windows-server-2003

Related posts about apache2