Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Drupal + imagecache (Topic Closed Topic Closed) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
webavant
Newbie
Newbie


Joined: 14 August 2007
Online Status: Offline
Posts: 2
Posted: 24 May 2008 at 10:15pm | IP Logged  

Drupal using the imagecache module automatically creates an .htaccess in the drupal/files folder.  It also creates one in the drupal main folder.  I would just delete drupal/files/.htaccess, but it keeps getting rewrote.  Removing write permissions to IIS is not an option either.

How do I get ISAPI_Rewrite to ignore the the drupal/files one and only use the main one?

Thanks.
Back to Top View webavant's Profile Search for other posts by webavant
 
webavant
Newbie
Newbie


Joined: 14 August 2007
Online Status: Offline
Posts: 2
Posted: 25 May 2008 at 3:36pm | IP Logged  

My solution was to just repeat the same rules in the nested child .htaccess, but an ideal solution would be if it would notice the parent .htaccess also.
Back to Top View webavant's Profile Search for other posts by webavant
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10483
Posted: 26 May 2008 at 9:19am | IP Logged  

You may use AccessFileName directive to have different name for ISAPI_Rewrite configuration files. Please read details here http://www.helicontech.com/isapi_rewrite/doc/AccessFileName.htm


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
zeman
Newbie
Newbie


Joined: 02 July 2009
Online Status: Offline
Posts: 1
Posted: 02 July 2009 at 8:07pm | IP Logged  

Editing the nested .htaccess in "sites/default/files" and added the default rules worked for me as well but I had to change the final rule to accommodate the new location of .htaccess. Using Rewrite 3.

RewriteRule ^(.*)$ /index.php?q=sites/default/files/$1 [L,QSA]

Might be worth adding this to the Drupal instructions page.


Edited by zeman - 02 July 2009 at 8:11pm
Back to Top View zeman's Profile Search for other posts by zeman
 
Sci-Fi Si
Newbie
Newbie


Joined: 28 September 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 28 September 2009 at 8:09pm | IP Logged  

@zeman

Nice one zeman! I'm using IIS6 on a Windows 2003 Serever and have spent the past 3 days trying to get imagecache to work. I've finally wound up here and this is the first sensible post I've read on how to slve the problem.

The trouble I'm having is it still doesn't work for me :( Are you saying that my .htaccess file in the sites/default/files directory should look something like this?


SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options +FollowSymLinks

#This is the code copied from the .htaccess in Drupal's root directory tacked on in here.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico

#The path below is no longer valid because this .htaccess file is in sites/default/files
#RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

RewriteRule ^(.*)$ /index.php?q=sites/default/files/$1 [L,QSA]


According to the troubleshooting node on Drupal.org

http://drupal.org/node/224913#comment-2092722

I should be able to go http://mydomain.com/files/image.jpg and ISAPI_Rewrite should do it's thing and re-direct that request to http://mydomain.com/sites/default/files/image.jpg but I still can't get it to work...

Any ideas?

Many thanks

Sci-Fi Si


__________________
There's no place like 127.0.0.1
Back to Top View Sci-Fi Si's Profile Search for other posts by Sci-Fi Si Visit Sci-Fi Si's Homepage
 
Sci-Fi Si
Newbie
Newbie


Joined: 28 September 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 28 September 2009 at 8:26pm | IP Logged  

OMG!!!

Hold your horses! Yes it does!!! OMG OMG I've been so used to failure and bleeding out my eyeballs trying to get this thing working that I'd forgotten imagecache has to create the image (in it's cache) before the image file is created!!!

I WORKS!!! YESSSSS!!!! HAHAHAHAHAHAH.....




__________________
There's no place like 127.0.0.1
Back to Top View Sci-Fi Si's Profile Search for other posts by Sci-Fi Si Visit Sci-Fi Si's Homepage
 

Sorry, you can NOT post a reply.
This topic is closed.

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum