I've migrated a D6 site to a new server and now it's working in a very strange way:

  • Homepage loads OK
  • Update.php and install.php loads OK
  • Any other page (including /admin, /user...) doesn't work. They load but they all show the homepage content instead of the content of that page.

You can see it live in http://www.efetic.com/

I'm not able to access /user, so I can't change any configuration, clear cache, etc. I've ran update.php but it doesn't change anything.

I've read some related issues and most seem to point it should be an Apache/htaccess error. I'm not using apache, but nginx. I don't know much about nginx, but I have other drupal sites working correctly in this same server (although they are all D7, not D6 like this one).

What do you think? It's a Drupal problem or an Nginx problem? Should I ask in Stackoverflow or Serverfault?


2 Answers 2


http://www.efetic.com?q=online/cursos-de-recursos-humanos-y-laboral returns 301 Moved Permanently and redirects to http://www.efetic.com/online/cursos-de-recursos-humanos-y-laboral. That's how SEO modules like Global Redirect work to prevent duplicated content issues. http://www.efetic.com?q=node/432 redirects to http://www.efetic.com/universidad/plan-acceso/cancelado - so your nodes are there all right and Drupal core recognizes them, if you are using access method independent on Apache's mod_rewrite (or similar technology if you are using another http server).

Now, there are 3 options:

  1. During migration you omitted .htaccess file. It happened to me with exactly the same results. File is hidden, so it's easy to make that mistake. If so, just extract one from fresh Drupal download.

  2. Your server does not support mod_rewrite (Clean URLs in Drupal) or requires specific configuration for it to work. If so, contact their customer support for feedback.

  3. You are using nginx as a server, not only a cache / proxy, and failed to comply with instructions on Drupal.org. You need to add (or have sysadmin to add for you) this to your settings:

     server {
         listen       80;
         server_name  example.org;
         location / {
             root   /path/to/drupal;
             index  index.php;
             error_page 404 = @drupal;
         location @drupal {
             rewrite ^(.*)$ /index.php?q=$1 last;

    Full config for Drupal is here on nginx wiki - read comments carefully, as D6 and D7 needs different approach, especially in rewrite section. Now your site behaves like D6 with nginx configured for D7.

  • You were correct. I was using the same configuration of the D7 sites for this D6 site. It works now after changing that part according to the nginx wiki. Thanks a lot!
    – pedro
    Jul 11, 2013 at 12:06
  • @pedro Glad it worked. And it WAS a matter of drupal_environment_initialize() == on topic here.
    – Mołot
    Jul 11, 2013 at 12:24

Check if your server supports Clean URLs. It is most likely the culprit.

You can consult the following threads on how to enable Clean URLs on Nginx.

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.