I mean:
I have a "forum" directory in Drupal which has a forum images in it. But when I want to go to mysite.com/forum/, server says that I have no access.
How to force Drupal to let me to go into /forum/ page. But when I want to access some image from /forum/ folder then let me have it!

Comments

dman’s picture

Check your .htaccess for:

# Set some options.
Options -Indexes

and comment that line out. For more info see the Apache manual on 'indexes' - it's possible to turn it on and off at will.

If it's JUST the /forum directory you want to open up for everybody to browse, you can give it its own .htaccess file that contains just

Options +Indexes

.dan.

aaabbbccc’s picture

no no.
I want /forum/ to act like a Drupal page and /forum/myimage.png as file

andre75’s picture

I think you have a naming problem since forum is a drupal page and a directory at the same time. This is a conflict that you can only resolve by renaming the folder.
Lets say rename it to forumx

Then in .htaccess you instruct apache to redirect any request to forum/(.*).\jpg to forumx/$1.jpg or so.
If you don't use [R], noone will notice.

Andre

yvelle’s picture

sounds like a rewrite problem. First: are you sure you have the file typed exactly correct? Because the .htaccess file should check whether the directory exists on the server or the file exists on the server, before it rewrites the directory for drupal.

I really think your best solution would be to change the directory where the image files are stored. I just use a 'graphics' directory and organizes the images under that.

aaabbbccc’s picture

me sure.

I have commented out
RewriteCond %{REQUEST_FILENAME} !-d
row from .htaccess

Now everything works as I wanted. But tell me somebody is that safe to do so?

andre75’s picture

if it works, leave it.
the line checks if there is a folder named like that and if there is, does not go the the drupal page

aaabbbccc’s picture

besides this step masquarads drupal's core folders and files.