Search form

The requested URL was not found on this server

I made a working site running on my PC with Uniserver and Drupal 5.2, upgraded to 5.6.
I copied the drupal files to the live site by FTP (I tried to install with Fantastico but it appeared not to work).

Then I managed to import my database, and can see the front page of my site (hooray!).

But none of the links work. I get a message like:

The requested URL /~[username]/drupal/node/5 was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Drupal is installed in /public_html/drupal

http://[ip-address]/~[username]/drupal shows me my front page.

I think there's a (separate?) problem here, in that I think I'll need the front page to appear just with http://[ip-address] without the /drupal. (I haven't changed the DNS yet). I think my index.php is in a subfolder of where it should be.. but that's the location I have it on my test site on my PC where it works ok otherwise.

From reading the forum, I thought I could fix the error messages by fiddling either with .htaccess or settings.php, but I have had no luck yet. I've seen several people with the same problem, but no clear solution.

If I uncomment "RewriteEngine on" in .htaccess the error message changes to:
The requested URL /home/[username]/public_html/drupal/index.php was not found on this server.

The drupal .htaccess is in public_html/drupal, and there's a tiny ,different one, made by the hosting server in public_html.

I've uploaded again from scratch, because it was getting messed up by my fiddling.
Now drupal is in the root of public_html instead of a subfolder.

I still have the same problem.

I've tried all variations I can think of for $base_url:
ip-address\username
ip-address\~username
ip-address\username\public_html
ip-address\~username\public_html

If I go to http://[ip address] then I see the text of my home page but with no css applied to it
If I go to http://[ip-address]/index.php then I see the proper front page, but as I say none of the links work:

The requested URL /home/rutlandb/public_html/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Here's my .htaccess (commented out bits removed):

# Protect files and directories from prying eyes.

Order allow,deny

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

Could you tell me the IP address (c2uk [at] gmx [dot] de - or contact me through drupal), so that I could have a quick look myself, I'd especially like to investigate these to occurrences:

If I go to http://[ip address] then I see the text of my home page but with no css applied to it
If I go to http://[ip-address]/index.php then I see the proper front page, but as I say none of the links work:

Could the missing css might be a cache problem? When I view the source of the incorrect page it points to css files in public_html\drupal .. but since I deleted and reinstalled directly in public_html that's the wrong path. When I add index.php to the URL it points to the correct css path. I tried a different browser so it isn't a local cache on my pc.

Or is there another file I should have replaced when I reinstalled but didn't.. hmmm. I could reinstall from scratch a third time.

Thank you.. you're a star.. I'd reached the conclusion that I need to go and RTFM to find out exactly how drupal works so I can figure this out myself.. though half the point of drupal was to be able to make a site without getting too techy! oh well.

Normally, you should be able to get drupal up and running and even a decent website without going into too much techy stuff, but your case seems a little bit strange.

1. index.php with css vs. / and no css:
For some absolutely odd reasons, your base url in index.php is correct: /~rutlandb/ but in the one where it doesn't work it is "/rutlandb/drupal/" - I've got absolutely no idea where this might be coming from or how this might be even possible, your htaccess seems to be fine. This might have to do with drupal caching, have you by any chance enabled this in admin/settings/performance?
1.a) on the band gallery, the links use the IP address.

2. page not found:
When not using clean urls, i.e. using index.php?q=node/2 for example, you get the right destination, that might indicate that your host doesn't support mod rewrite, try deactivating it by going to index.php?q=admin/settings/clean-urls - hope you are logged in, if not you need to uncheck clean urls before you export your database from your local setting.

- forget it, this seems to work now, well done!

Edit: I just see, yes the rewrite base url, forgot this one, shame on me! I remember now, I had the same exact problem a couple of months ago with a new website of mine...

I had a similar problem and have been struggling with it for the last few hours.

When I built my Drupal installation a year ago, I developped everything on my local PC, then moved the site in production, accessible to anyone. I added little by little more stuff to it (I customized the template, added more content type, etc). But everything I did was no accessible to users that were not admins, so (I know it's not the best practice, but!) I made my changes directly in production.

But for the latest updates I needed to do, I had to make the changes on a development installation before putting everything in prod. I exported my drupal installation folder, exported and imported my database, modified my settings.php and .htaccess files, ran update.php. I then accessed my front page with my template and everything. Then I tried to see another page: URL not found. I then guessed that the problem was coming from the paths (I recalled using the ?q= when developping at first.). I thought this module was the path module and path auto (which was not..... darn!).

Seeing your post made me remember that it was clean urls. Thanks for the link. Deactivated it, then it all works flawlessly.

just wanted to add that if site is in offline (maintenance) mode it may also prevent things from working

in my d6 install on my web server, i tried exporting things back to my localhost, but it was not working, so i fix it by:

-turning clean-urls off
-putting the site back in online mode
-re-exported the db with the new above configs and imported to my localhost.
-commenting and disabling the line in settings.php the domain/base url is specified.
i.e.# $base_url = 'http://example.com'; // NO trailing slash!

-may also need to remove/rename the .htaccess file in your localhost.

note: this post was high ranked on google (so it's easy to find) and had some useful info, but still my case was a bit different.
So this should help anyone with similar issues or Just in case i forget and mess up again :)