I've just done an install of Drupal 4.6.6 and have been having difficulty getting Clean URLs to work. First the clean URLs option in Settings would always reset to Disabled, despite me selecting Enable repeatedly.

I discovered during this that the .htaccess file wasn't visible to me when I first uploaded the application files, so I uploaded this. Now I am getting 403 Forbidden error messages and no access to the site!

I know I', doing something stupid. Just can't figure out what! Can anybody help me?

Comments

Visigotik’s picture

Do have apache's mod_rewrite enabled? also check your httpd.conf for the AllowOverride directive and if it's set to
AllowOverride None
change it to:
AllowOverride All
and make sure that you have the ".htaccess" file on your drupal directory.

Gerard McGarry’s picture

I host with Dreamhost and mod_rewrite is on by default. I am using WordPress with rewrite rules on another account.

Drupal is installed on a subdomain (forum.unrealitytv.co.uk) and is located in the root of this folder. The .htaccess file is located in the root area along with the other Drupal files.

The forum was functioning perfectly (albeit without clean URLs) until I uploaded the .htaccess file. Now I'm getting 403 forbidden messages!

benthere’s picture

Try uploading an original copy of the .htaccess that came with your version. If you uncommented the RewriteBase line, that could cause that error.

-- Ben // profilefx.com

Gerard McGarry’s picture

The .htaccess is the original from the source package - I've not made any changes

KSA213755’s picture

Gerard,
I assume you're using cPanel or something like it to upload the .htaccess file to your site. If the file already exists the upload won't replace it unless you check the "Overwrite existing files" box. But cPanel is not real obvious, at least for me, in letting you know the upload didn't work.

You might open the .htaccess file on your site and make sure it looks like the one that came with Drupal.

Roger

Gerard McGarry’s picture

Roger: Thanks for your response. I'm not using cPanel, just old fashioned ftp!

I flattened the installation, deleted the database tables and all the Drupal files on the web server.

I used ARK to extract the Drupal 4.6.6 tarball to the harddisk, modified the /sites/default/settings.php with the installation root and database details. Then I uploaded all the required files.

I used phpMyAdmin to import the database.mysql file which successfully created the database. Then I went to the homepage...and got the forbidden message again.

The only file modified during this process is the /sites/default.settings.php, yet I have this problem.

Gerard McGarry’s picture

Well, I had pretty much nailed this down to being a htaccess issue. It turns out the permissions on the htaccess file were preventing it from working correctly. I had to allow write access to allow Drupal to generate (I think) the clean URLs.

Anyone know what the recommended permissions for htaccess files should be?

sepeck’s picture

http://wiki.dreamhost.com/index.php/Drupal

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

jhaggenburg’s picture

I've had this problem to, but I got it to work pretty fast. The problem ended up to be quite easy to fix though undermining.
I've uploaded the complete directory of drupal for installation, but after that I used cpanel to protect the root-folder, overwriting the htaccess! Luckily I was advised to try the original, from the drupal-package, and it all worked great. I just added the lines from my old one and I'm good to go. Just to let you know.

niklp’s picture

Adding this because it was so simple it did take me a little while to figure out... (me = teh stupid)

*DO* make sure you actually have a .htaccess file! :)

I did a "cp -R " to take a local copy of a site, but as usual *nix CLI commands don't move/copy/whatever hidden files, so the .htaccess didn't move with it.