I've installed Drupal 4.6 and is working fine.

What do I need to add to .htaccess file in order to allow access to my non-Drupal folders? At the moment it seems to be blocking all my old, static html.

Brian.

Comments

inteja’s picture

I Googled .htaccess and came up with using the Limit directive in subfolder .htaccess to override Drupal's .htaccess in the root folder but this didn't work.

<Limit GET>
    order allow,deny
    allow from all
</Limit>

Can someone please give me some pointers? I'm lost.

Brian.

--
Brian.

jack-2’s picture

I just removed pl in the files section (line 6) and awstats is working for now. With pl on this line it won't work.
example : http://www.chinaroots.nl/awstats/.
So maybe another extension for you to remove ?

edit:
forgot to tell awstats is a perl script (awstats.pl)

inteja’s picture

I'm having trouble (access denied) with simple HTM web pages, and there's no htm extension to remove in Drupal's .htaccess.

There must be some directive to tell Apache to allow access to everything in the current folder and its sub-folders?

Brian.

--
Brian.

inteja’s picture

I probably wasn't asking the question properly.

To solve my problem, I simply added index.htm to Drupal's .htaccess file. The modified line reads:

DirectoryIndex index.php index.htm

Brian.

--
Brian.

tango-1’s picture

It's working.
I had a same problem with my site and didn't know what to do.

peterx’s picture

If you have a subdirectory containing index.php then you will never see the index.php. You can exclude the whole subdirectory using the example shown in the following .htaccess code. The example excludes the directory named phpmyadmin.

<IfModule mod_rewrite.c>
	RewriteEngine on
	# A trailing / is added to directory requests by the http.conf or somewhere.
	# Exclude the phpmyAdmin directory.
	#RewriteCond %{REQUEST_FILENAME} !^phpmyadmin.*
	# Rewrite only if the file is not found.
	RewriteCond %{REQUEST_FILENAME} !-f
	# Rewrite only if the directory is not found.
	RewriteCond %{REQUEST_FILENAME} !-d
	# Rewrite a URL to make the request a query parameter of q=original_request.
	RewriteRule ^(.*)$ index.html?q=$1 [L,QSA]
</IfModule>

http://petermoulding.com/technology/content_management_systems/drupal/

seanr’s picture

This doesn't work even after uncommenting that line. Anyone have any ideas? I need to get this fixed ASAP.

Sean Robertson
www.webolutionary.com/freedom
webolutionary@webolutionary.com

peterx’s picture

Hello Sean,
I had one too many rules to easily put into .htaccess so I switched to PHP. I am not recommending the following approach but it might help work for people who are experts at PHP and rarely use .htaccess.

My sites point to index.html. index.html includes index.php. my code runs first then the Drupal code. In index.html I check for the existence of certain files and directories then redirect to those files/directories if they exist.

I switched from .htaccess to PHP because complex rules did not work as expected in .htaccess and some rules interfered with others. While .htaccess is faster, PHP is easier for me because I frequently work in PHP and rarely looked at .htaccess file until Drupal.org brought in the policy of at least two new release candidates per day. :-)

petermoulding.com/web_architect

alexandreracine’s picture

So, just to clear up everything.

Create a .htaccess file in the sub-directory.

Put in it:
DirectoryIndex index.php index.htm index.html

Surf!

You can add other point of entry if you want.

Alexandre Racine

www.gardienvirtuel.com Sécurité informatique, conformité, consultation, etc

www.salsamontreal.com La référence salsa à Montréal