Not sure what's going on here (may be normal, and just not something I've seen before!).
I've been revamping a site, and am deleting some old static versions of pages, that now have a database behind them.
For example, this page:
I've deleted the /driving-schools-fort-william-som/ folder from the remote server, but the page is loading up the site's index page, but not seeing the CSS, as the paths are wrong.
Shouldn't this just bring up a page not found 404?
Altruistic Gramps wrote:
No, because the page can still be found on the server.
Gramps
How's the server finding the index.html page in the 'driving-schools-fort-william-fort-william-som' folder if the OP has deleted it?
You positive you have deleted the folder Iain because the server say otherwise?
I'm pretty sure - its not showing on the remote server under 'files' in DW. And I've double checked looking in the control panel on the server.
That page is a copy of the sites main index page, not the old index.html page that was in the folder.
I have just noticed a line:
<link rel='index' title='Driving Lessons, Driving Schools – The Learners Guide | Your route to succes' href='../../index.html' />
In the existing pages. But that doesn't make sense either, as the page has been deleted.
I've added a disallow to that folder in the robots.txt file, so hopefully it'll disappear from Google searches soon, but it is a bit weird as far as I can tell.
What makes even less sense (if as you say you have deleted the folder) is the folder/absolute path to the index.html file is still on the server:
Even if you had some kind of re-direct going on to another index.html page it makes no sense that the server is saying the index.html is in the 'driving-schools-fort-william-fort-william-som' which you have deleted.
Mind you having taken a look at the code it looks like its partly Wordpress?
Yeah - the original site was done in WP, with individual pages for each driving school. The original web guy basically disappeared or was completely unreliable, and its one I've inherited. I'm glad its not just me thinking its a bit odd. At the moment I assume it is some weird hang up of WP - either way, I'm assuming now I've added the disallow to the robots.txt these pages will just drop off Google's radar.
OK, this does seem a bit odd.
I tried it today with a made up page - basically anything will display the homepage if its in the root directory, eg:
http://www.learners-guide.co.uk/no_such_page.html
And any other non existent page in any other folder does the same as the original link, eg:
http://www.learners-guide.co.uk/no_such_folder/no_such_page.html
If anyone has any idea what's going on here that would be much appreciated!
Have you made custom error pages for the site? Is it possible your 404.htm page was accidently written over with the page that is being delivered?
That's the only think I can think of.
Jim
Edited: If you are on an Apache webserver, it's possilbe that you .htaccess file is pointing the 404 to another file.
ErrorDocument 404 /404.htm
ErrorDocument 500 /500.htm
Actually, that didn't work out, as that just redirected every page to the home page.
So I just deleted the .htaccess file.
I assume that's not a problem?
This was it in full:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# END WordPress
Iain71 wrote:
Actually, that didn't work out, as that just redirected every page to the home page.
So I just deleted the .htaccess file.
I assume that's not a problem?
This was it in full:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# END WordPress
Thought it may have something to do with Wordpress and redirecting.....Wordpress works in a very complex and confusing way unless you know the secrets.
If that was all that was in the htaccess file then it's ok to delete it but you may want to re-instate it at some stage later if you want to redirect users to different/updated pages based on what you do maintenance wise.
As long as the Wordpress Module is removed the htaccess file on the server alone shouldn't do any harm
North America
Europe, Middle East and Africa
Asia Pacific