By Benq on
Hello there!
I'm brand new to Drupal, and have been having great fun using it on my local server. Now it's time to bring it to a live server.
Unfortunately, there is a folder on this server that I do not want to delete or move. The folder is /Charts and it has got a lot of old images that need to still be served/available. When I try to access it, I get a not found error.
I've tried without luck to modify .htaccess like so....
=========[ start of .htaccess snippet]==========
<IfModule mod_rewrite.c>
RewriteEngine on
#
# stuff to let through (ignore)
RewriteCond %{REQUEST_URI} "/Charts/"
RewriteRule (.*) $1 [L]
#
====================[ end ]=====================
Thanks everyone in advance. Also, Drupal is awesome!
Comments
htaccess
It sounds like you want to show a directory index. Place a new .htaccess file in the Charts directory, and enable it there. This will make the directory behave as normal:
DirectoryIndex index.php index.html index.htm
Options +Indexes
Thanks for the help
Thanks for the help yelvington!
I added that code to the .haccess but to no avail. I do have the module Thrifty 404 (http://drupal.org/project/thrifty404) installed. Do you think that might have an effect?
EDIT: This was a dumb question. I simply disabled the module to test it. The answer is: nope. :)
Sounds like ...
Sounds like you may have an issue with your server being configured to ignore some .htaccess directives.
Let's walk through this again.
Basically, Drupal is a 404 handler. If a file exists and access to it is not forbidden, Apache will serve it. Drupal will not be involved.
Forbidden files are defined at the top of Drupal's .htaccess, and the rules apply to all child directories unless there's an override.
Notice that images, archives, Javascript, CSS files, text, PDF, office formats, et cetera are NOT forbidden here.
In order to prevent fishing expeditions in your various directories, Drupal forbids the generation of automatic index views:
If a file or directory does not exist, then Apache is instructed to rewrite the URL as a query and pass it to Drupal for resolution. See the bottom of .htaccess:
So, if you request /Cache, and /Cache exists, then Apache should try to process the request directly, not hand it to Drupal. Apache should display a "forbidden" error because Drupal's .htaccess file previously has told it that all directory requests are forbidden.
But if you placed .htaccess in /Cache overriding that rule, you should get a generated directory index. And in that .htaccess file you should be able to override and reverse any other Drupal settings that you don't like.
If your webserver is not processing that .htaccess file, there might be a permissions problem or there might be a server-wide configuration forbidding a setting from being changed. If you're paying for hosting, this may be an issue for your hosting provider to resolve.
maybe misunderstood
yelvington,
This is a very informative thread. Thanks!
I think the OP didn't follow your instructions. When I read "I added that code to the .haccess but to no avail." it doesn't sound like he or she created and placed a new .htaccess file in the Charts directory as you instructed.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Hey there! I actually did add
Hey there!
I actually did add a new .htaccess file to the Charts directory. :)
yelvington,
Thanks for the awesome info. I use WAMP so I'll check if I set something up in a goofy way.
Again, I really appreciate your time!
I am trying to make this
I am trying to make this work. I am trying to install phplist at /lists where Drupal is at the root. phplist already has its own .htaccess file. I have tried adding
ErrorDocument 401 "Unauthorized"as described in other posts but I can't get it to work. It seems like there should be a module for this.