11 Replies Latest reply: Apr 4, 2012 2:48 AM by osgood_ RSS

    Deleted page loading without CSS

    johngordon12 Community Member

      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:

       

      http://www.learners-guide.co.uk/instructors/driving-schools-fort-william-fort-william-som/ index.html

       

      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?

        • 1. Re: Deleted page loading without CSS
          Ben Pleysier MVP

          No, because the page can still be found on the server.

           

          Gramps

          • 2. Re: Deleted page loading without CSS
            osgood_ MVP

            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?

            • 3. Re: Deleted page loading without CSS
              johngordon12 Community Member

              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.

              • 4. Re: Deleted page loading without CSS
                osgood_ MVP

                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:

                 

                http://www.learners-guide.co.uk/instructors/driving-schools-fort-william-fort-william-som/ index.html

                 

                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?

                • 5. Re: Deleted page loading without CSS
                  johngordon12 Community Member

                  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.

                  • 6. Re: Deleted page loading without CSS
                    polar_bare Community Member

                    If you go to the page in Firefox and try to edit the html, everything from the opening body tag up is gone. I have seen cases where the old pages were cached on the webserver. If this is the case, it should clear up soon.

                     

                    Jim

                    • 7. Re: Deleted page loading without CSS
                      johngordon12 Community Member

                      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!

                      • 8. Re: Deleted page loading without CSS
                        polar_bare Community Member

                        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

                        • 9. Re: Deleted page loading without CSS
                          johngordon12 Community Member

                          Thanks Jim. I found the .htaccess file, and sure enough there was a line:

                           

                          RewriteRule . /index.php [L]

                           

                          I've changed it to the full URL of the main index page, so no more unstyled versions appearing.

                          • 10. Re: Deleted page loading without CSS
                            johngordon12 Community Member

                            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

                            • 11. Re: Deleted page loading without CSS
                              osgood_ MVP

                              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