I want clean URLs like webpage.com/page instead of webpage.com/?q=page, specifically in my menus.

I have gone here http://v6.dev/admin/config/search/clean-urls (which is a clean URL and works) and ticked the 'enable clean URLs' option and saved. But nothing happens, the page reloads without the tickbox checked.

Clean URLs are working, I can navigate to webpage.com/page fine, but the menus aren't being generated as clean URLs.

I have gone through this page: https://www.drupal.org/getting-started/clean-urls but can't solve the problem. I think the servers set up okay, because I can succesfully navigate to clean URLs, it's just that links aren't rendered as clean URLs. I've also tried cleaning the cache, and restarting server.

If it helps, I'm generating menus with this code:

    $menu = menu_navigation_links('menu-top-menu');
    print theme('links__menu_main_page', array('links' => $menu));

2 Answers 2


First thing I would check is the .htaccess is indeed working...maybe your getting a cached version of:


What happens when you enter a URI which you know has never existed (and been cached) such as:


Does it 404? Does drupal handle it and say "page cannot be found"?

I had a similar issue a few days back...I had to manually disable "clean uri's" in the database...flush all cache tables...re-enable mod_rewrite...log in and enable clean URI's

Let me know how you turn out. :)

  • v6.dev/xxx-237347-3iu33 leads to a 404 page with 'The requested page "/xxx-237347-3iu33" could not be found.' as the content, so I think the htaccess is working correctly. Thanks for your help.
    – S..
    Jul 17, 2014 at 7:28

I added

$conf = array(
  'clean_url' => 0,

to the top of the settings.php file ('/sites/default/settings.php) which solved the problem, now clean urls were generated, as well as working to handle requests.

I first added it to the bottom, but this affected the admin theme of the site, adding it to the top instead of the bottom solved that.

Your Answer

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

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