Can't Get Clean URLs Working: Now Getting Forbidden Message

Gerard McGarry - March 15, 2006 - 09:47

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?

Do have apaches's

Visigotik - March 15, 2006 - 10:48

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.

I host with Dreamhost and

Gerard McGarry - March 15, 2006 - 11:46

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!

Did you edit the .htaccess file at all?

benthere - March 15, 2006 - 12:02

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

The .htaccess is the

Gerard McGarry - March 15, 2006 - 12:09

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

Look at your .htaccess file

KSA213755 - March 15, 2006 - 12:29

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

Roger: Thanks for your

Gerard McGarry - March 15, 2006 - 12:40

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.

Here's a solution

Gerard McGarry - March 15, 2006 - 13:10

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?

Dreamhost wiki may help you

sepeck - March 15, 2006 - 16:14

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

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

Same problem, different solution

jhaggenburg - May 7, 2008 - 20:59

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.

 
 

Drupal is a registered trademark of Dries Buytaert.