Closed (won't fix)
Project:
ImageCache
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2006 at 21:48 UTC
Updated:
18 Oct 2006 at 09:14 UTC
Perhaps rather than requiring the user to disable the 'security' .htaccess file in the files directory, we should over-ride it another .htaccess file which re-enabled mod_rewrite ONLY for the imagecache dirctory. We can automatically create and install this file in the proper place during the install routine. The following seems like it would solve the problem:
Create an .htaccess file in the files/imagecache directory. Paste these contents:
SetHandler Image_Cache_Rewrite
Options FollowSymlinks
<IfModule mod_rewrite.c>
# Re-enable clean urls for the imagecache diretory
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ../../index.php?q=files/imagecache/$1 [L,QSA]
</IfModule>
This file would need to be generated by PHP, as the location to the root directory of Drupal will vary by installation.
Comments
Comment #1
dopry commentedIn DRUPAL-4-7 and DRUPAL-5 this change has already been made... I'm not sure if it is in the current 4.7.3 tar ball... I'll check later, but lets no fix core bugs from contrib modules.
Comment #2
quicksketchGreat, I hadn't been aware of the changes. I'm glad we can avoid the hack.