Drupal htaccess

htaccess to remap /images to a Drupal images folder

Your site files are in

/sites/all/default/files/images/filename.png

But you want to be able to link to them at

/images/filename.png

Use this .htaccess code

RewriteRule ^images/(.*\.(gif|png|jpe?g))$ sites/default/files/images/$1 [QSA,NC]

Leave a Reply