10

I have a new installation of Drupal 7. I was having a problem with administrative overlay URLs having URL encodings in them, which I asked about here. Another user suggested I confirm that I have clean URLs enabled.

When I went to Home » Administration » Configuration » Search and metadata » Cleanr URLs, all I see is this:

Use URLs like example.com/user instead of example.com/?q=user. If you are directed to a Page not found (404) error after testing for clean URLs, see the online handbook.

The message was followed by the button, "Run the Clean URL test." that seems to do nothing: The browser tells me it's loading something from the site, but the page doesn't change.

I have no options to enable or disable clean URLs.
I'm pretty sure it's disabled, because when I go to website.com/user, I get a 404.

How can I troubleshoot this?

1
  • Before jumping the gun and installing the patch listed below, please read the guidelines for configuring the clean URLS here. Definitely look at your server configuration to make sure things are set properly.
    – aug
    Aug 7, 2014 at 0:47

5 Answers 5

11

This is a known problem in Drupal 7. The "Run the Clean URL test" button does not behave like that page says it does, and this can be very confusing. Please see "Run the clean URL test" UX is broken; basically, what it comes down to is that the logic and UX of that page is broken, but the clean URL system itself (ie. the part in Drupal core that makes clean URLs work) does not contain any (known) bugs.

If you cannot enable clean URLs (you don't see the checkbox to enable it), this means that a test has already been run, it returned a negative result, and you should check your server configuration. See drupal.org - Clean URLs for documentation.

PS. If you can, test the patch from comment #87. This patch will improve the UX on the clean url's page, but it will not solve problems with an incompatible server configuration.

1
  • I followed your directions, and tried applying the patch, but I wasn't successful.
    – picardo
    Jul 19, 2011 at 2:20
5

Is Drupal installed in a subfolder?

I had a similar problem using Drupal on a subfolder. Try this:

  1. Open your .htaccess file

  2. Look for the following line (line 100 on Drupal 7.4 .htaccess file):
    # RewriteBase /drupal

  3. Uncomment this line and change the "/drupal" to match your subfolder. In my case, since Drupal was installed on a folder named "/public_html/test", I changed so:
    RewriteBase /test

  4. Try enabling Clean URLs again. You should now see the checkbox "Enable Clean URLs" available.

For me, this solved the problem.

2
  • I had to change my RewriteBase to ~username/drupal. I'm running MAC OS X.
    – dtillz
    Jun 22, 2013 at 22:53
  • Yup this solved it for me. Thanks a ton. Such a simple mistake too.
    – aug
    Aug 7, 2014 at 0:45
4

Are you using WAMP? You need to enable the Apache rewrite_module through the WAMP interface. When you do you will find the Clean URL's option under Search and Metadata heading of localhost/MYSITE/admin/config

1
  • Not using wamp.
    – user1359
    Jun 15, 2011 at 19:55
2

I had this problem in local, and i am using wamp, if you go in the apache directory in your wampserver, you look in "apache modules" and scroll down until you find rewrite_module, check it and it should work! I hope it will help

2

When I ran the clean URLs test, nothing happened.

In order to correct the problem, I went to the directory where Drupal was installed (a subdirectory of my main site), and found the ".htaccess" file; this is a different ".htaccess" file than the one in the root directory of the web server, and it is part of the original install.

The file was named ".htaccess.txt"; I removed the ".txt" extension, then ran the clean URLs test again. It ran successfully and the Enable clean URLs check box showed up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.