For some reason, Clean URLs stopped working on my site. All URLs are being redirected to the front page. I was able to type the "unclean" url to disable it for the site. Any non-recognizable path should return a "page not found" instead they still get directed to the front page even with Clean URLs disabled. The link to test for clean-urls directs to the front page, too. Any ideas of where to trouble shoot?

Comments

vm’s picture

insure mod_rewrite is still enabled on the server.

boinkster’s picture

I checked that. I even tried it on a server that I know is set up correctly - still the same results.

cog.rusty’s picture

That shouldn't happen, but... too little information.

Also I wonder what you tried on a correctly working server. You copied your files? Uploaded your database? Both? With a domain name and with a settings file of identical form? Same .htaccess file? Apparently somehow you carried the problem over but there is not much to go.

boinkster’s picture

Server 1:
drupal runs in a subdomain (drupal.example.com) that points to a folder of the web root: webroot/drupalfiles
no other drupal installs on this account
Apache version 1.3.37 (Unix)
PHP4 Version 4.4.6
MySQL version 4.1.21-standard

Server 2 (a VPS)
Started from scratch with a new account. I copied all the files and backed up and restored the database. Different domain name and DB name/login but otherwise identical to Server 1.
Runs as the main domain, files in the web root.
Apache version 1.3.37 (Unix)
PHP version 4.4.7
MySQL version 4.1.21-standard

I have other accounts on Server 2 that have no problems so I knew that the set up was good. I had guessed a problem with the setup on Server 1 which is why I moved everything to Server 2. I figured I could work on Server 2 while I solved problems with Server 1. Did not expect the problem to follow.

Potential clues?:
Currently, the Clean URLs settings page has Clean URLs disabled and the radio buttons are disabled pending running the clean url test. The link pointing to the test is: http://example.com/admin/settings/clean-urls. Clicking this link should run the test and enable the radio buttons. Instead, it loads the front page. But this IS the problem: any URL without a "?q=" loads the front page.

Possibly related?
When editing a node with TinyMCE, clicking on one of the javascript powered edit popups (like edit HTML or insert image), Server 1 returns a permissions error AND a 404 in the popup. Server 2 does not have this problem.

cog.rusty’s picture

Yes... strange.

What I have noticed is that the "Enable Clean URLs" setting does not actually enable them, it just puts them in the menus if they are already enabled by the server and .htaccess. Proof of this is that the "test clean URLs" link is already a clean URL. With the right server and .htaccess settings clean URLs work even when you have them disabled in that page.

Did you go over the steps given here?

http://drupal.org/node/15365

baraban’s picture

Here is what happened to us and what we did to fix the problem:
Fixing a Clean URLs problem

boinkster’s picture

I traced the problem to the .htaccess file. The line:

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

had been commented out.

ggarron’s picture

Today, my site http://www.go2linux.org was all well working and suddenly it stopped working, I had to turn off clean urls to have my site back to life, I tried to move it to another server, backing up the site and the database, with no luck.
I even tried following the instructions on a new etch server also with no luck.
http://drupal.org/node/15365, still could not solve it.

ggarron’s picture

It was only the

RewriteEngine ON

on my .htaccess file, that was possible hacked, that line were erased!!, I could compare with a previous backup of my site, and only that line as missing after doing a diff between the two files, once reinstalled the previous .htaccess file all was ok again.
I am upgrading to drupal 5.2, maybe it was a security hole??