I have recently moved my files from dev server to test server. same setting and db of dev server were copied to test server. In dev server all is working fine but when I have am checking in test sever /user not working but /?q=user is working

I have checked with mod_rewrite in test server apache setting and it is enabled. I also checked my clean url drupal setting it is also enabled

/user throws 404 error for me

Not Found

The requested URL /user was not found on this server.

Can someone help me find the issue

  • 2
    What do you mean by "not working", exactly? 404? 403? 200 but error on screen? Your browser reads 404 from internal cache? Or from proxy? Or what exactly happens? Currently it is not possible to list all possible the reasons. – Mołot Sep 5 '14 at 7:04
  • it is throwing 404 – Hitesh Sep 5 '14 at 7:08
  • 1
    your root directory has .htacess file ?? – Mr. J Sep 5 '14 at 7:35

As you have checked mod_rewrite settings for your server and .htaccess both it sems that you may have mis-configured RewriteBase in your .htaccess file.

Please check comments in .htaccess file

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a VirtualDocumentRoot and the rewrite rules are not working properly. For example if your site is at http://example.com/drupal then its value should be:

RewriteBase /drupal

If your site is running in a VirtualDocumentRoot at http://example.com/, then its value should be:

RewriteBase /

Try and see if you have something wrong here.

| improve this answer | |
  • yes problem was with root directory in .htaccess file thanks for the info – Hitesh Sep 5 '14 at 10:35
  • 1
    Note that if you are using the RewriteBase directive that you have to remove the hash (#) from the start of the line to uncomment it. – rooby Aug 5 '15 at 15:58
  • yeah that's correct, edited the answer – Ashish Bairagi Aug 6 '15 at 8:30

I'd recommend reading https://www.drupal.org/getting-started/clean-urls - this has a lot more information on setting up clean URLs.

It's likely that the .htaccess file is not set up properly, or the server doesn't allow the commands in the .htaccess

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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