Hello,

Everything is OK with my new Drupal site, except that when I type the root of the site (www.site.com), I receive the message "Page not found". If I remove the .htaccess or I type www.site.com/index.php, it is OK with the root. All the other modules work. I use the .htaccess from the Drupal 5.3 installation package, without changes.

Can anyone help me?

Thanks,

Nicolae

Comments

gpk’s picture

Do you get a Drupal page saying "page not found" or a server error? What does your server error log say, and the Drupal watchdog log?

gpk
----
www.alexoria.co.uk

sfetcu’s picture

It is a Drupal page. The log entries says:

Type page not found
Date Friday, November 16, 2007 - 19:13
User admin
Location http://www.eye-tracking.info/
Referrer
Message forbidden.html
Severity warning

I have installed tens of Drupal sites on the same server, but this is the first time when I get this error. Maybe it is important to say that I installed firstly the Drupal 5.3 with PHP 4 but, when I saw the errors, I changed it to PHP 5.2.2 and I reinstalled the Drupal 5.2 this time, with a database already existing from a previous web site that is running. Also, I tried to change the database in settings.php to use a database of another web site that is running, but I get same error.

Thank you,

Nicolae

gpk’s picture

A few thoughts:

1. How have you defined your 404 and 403 pages? Looks like we are trying to acess forbidden.html, which would be the 403 (access denied) page??
2. How have you defined your home page?
3. I don't think you have the default .htaccess file since it seems to be using mod_rewrite to add a leading www. if not already present - this should be fine though.
4. As you doubtless know each version of Drupal has its own database schema. So a given database cannot be used with different Drupal (codebase) versions. What Drupal version does the DB originally come from? If you move to a more recent version of Drupal you must run update.php. There are no facilities that I am aware of for "downgrading" a database's schema to make it work with an earlier version of the Drupal codebase.

Having said all that it does look as though the DirectoryIndex statement in the .htaccess is not working, and that something in the .htaccess is actually fouling up the default behaviour (which seems to be to use index.php if present), given that .../index.php works OK. If you put an index.htm file there does it get found automatically?

HTH

gpk
----
www.alexoria.co.uk

sfetcu’s picture

Hi,

1. 403 and 404 are default (blank spaces in settings, I just checked it)

2. Default (node)

3. There is an option in CP (Dreamhost) to redirect URL without www to www, and I used it. Now I deactivated this option, and the situation is like this:

- without www: everything is OK
- with www: like before

This option does not add a htaccess in the root or changes an existing one, it seems that it is used a htaccess outside my FTP access

4. Both files and db are Drupal 5.2 (I already have a problem with pathauto for all the sites for v. 5.3, and I thought that it might cause this problem with "page not found" too, so I uninstalled 5.3 and used 5.2 for this site)

I tried with a "fresh" htacces from the archived installation package from both versions, same results.

If I add an index.htm file, for the version without www it is OK, for the version with www I get same "page not found" no matter I have index.php, index.htm, both, or none.

My guess (as a complete newbie in programming) is that when I changed from the control panel the php version from 4.4.7 to 5.2.2, there was generated an error that it is possible to disappear after some time. But if you think, based on these information, that the error is generated by the installation or settings of the web site, please let me know and I will try a fresh install.

(Right now I am trying to see how it works with an empty folder (root), just an index.htm in it: for without www it is ok, with www I still see the "page not found" but the site looks like it has no available theme, so it seems that it is the cache of my browser.)

Maybe it is important also to say that till some days ago there was installed a PHP-Nuke web site, because I see now in logs many errors generated by other visitors trying to access the old modules.php.

gpk’s picture

Yes if the web server can't find the default index.htm (or index.html - which I think is usually the default) then something is clearly awry. I wonder, is there something in the Dreamhost CP where you can define the default "directory index" file(s)? It's very strange that this should only go wrong on the www. case, and it looks like it is a webserver config problem rather than anything to do with PHP (or Drupal for that matter). Might be worth asking Dreamhost for assistance.

gpk
----
www.alexoria.co.uk

sfetcu’s picture

It was not Drupal, but the server. Same files, same db, changed server, everything is OK now.

Nicolae

gpk’s picture

:-)

Glad to hear you got to the bottom of it.

gpk
----
www.alexoria.co.uk

sfetcu’s picture

I was wrong, it was not the end. It was not the server, but the htaccess file. The original htaccess file. I tested it word by word, till I discovered that everything is ok if I remove the word "info" from the sequence:

FilesMatch "\.(engine|inc|info|install|.....

I think that, because my site is an .info TLD, htaccess consider it as a directory and does not allow direct access?

Anyway, after I remove the "info" word, now it is ok.

Nicolae

gpk’s picture

Hmmmm tricky!

gpk
----
www.alexoria.co.uk

soupp’s picture

Yay! Thanks sfetcu.

Totally helped me in the same situation (.info + dreamhost).

Just one more thing to add: don't forget to clear the cache tables in db after applying this change to .htaccess.

Drupal Top Sites | Drupal Sites Directory

gpk’s picture

I wonder if this problem is specific to Dreamhost ... if not, then it might be a Drupal bug and an issue should be opened against the Drupal project...

gpk
----
www.alexoria.co.uk

jeeves’s picture

I'm NOT hosted with Dreamhost and I experienced this problem with Drupal 6. Fortunately sfetcu's .htaccess fix worked for me.

gpk’s picture

Hmm sounds like it potentially can be considered a bug in Drupal core. I wonder if there are any webhosts where .info domains work nicely without modifying the .htaccess? I'd expect there to be more posts on this topic if not, but hard to say really.

Thanks for opening this issue http://drupal.org/node/226331 on subject - saved me the trouble!

gpk
----
www.alexoria.co.uk

soupp’s picture

I have a few .info domains on pretty average Plesk (8) managed servers (shared and VPS) and there were no trouble at all. But it is definitely about server setup I believe.

Dreamhost uses some customized FreeBSD boxes but the ones I had with Plesk were RedHat, Fedora or CentOS. Out-of-the box MacOS X (BSD based basically) don't have this issue as well.

Drupal Sites Directory

ahales’s picture

Its definitely not a Dreamhost specific problem. I'm having the same problem with a .info tld. My site is hosted at Hostgator. Its part of a multi-site install. All the other sites (.net, .com) works fine. When I remove '|info|' from the FilesMatch string the .info site worked. Thank you sfetcu for ferretting out a fix