Clean urls working everywhere except my custom module I'm attempting to create a custom drupal module, but I can't get clean urls to work. Clean urls have been enabled and are working everywhere else on the site.

I can access my module page using "?q=" but if I remove that and try to access it with the clean url I get a "page not found" error.

I've tried clearing the cache and rebuilding the menus using devel. I've also tried disabling and re-enabling my module.

Here's the code I have in my .module file.



/**
 * @file
 * This example demonstrates how a module can display a page at a given URL.
 */

/**
 * Implements hook_menu().
 */
function page_example_menu() {
  $items['examples/page_example/simple'] = array(
    'title' =&gt; 'Simple - no arguments',
    'page callback' =&gt; 'page_example_simple',
    'access arguments' =&gt; array('access simple page'),
  );

  return $items;
}

/**
 * Constructs a simple example page.
 *
 * @return array
 *    The render array for the simple example page.
 */
function page_example_simple() {
  return array('#markup' =&gt; '&lt;p&gt;' . t('Simple page: The quick brown fox jumps over the lazy dog.') . '&lt;/p&gt;');
}
Turns out the issue was in my company's custom configuration. Certain pages are routed via Drupal while others are handled by a legacy system. All I had to do was add my module's path to our config and everything works now.