Announcement

Collapse
No announcement yet.

"soft" 404 errors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "soft" 404 errors

    I created a custom 404 page (Catalog v9.04) which returns soft 404's: the page displays correctly, but gives a redirect which results in a 200 response code.
    Apparently, this is because I used an absolute/full URL in the .htaccess file:

    ErrorDocument 404 "DomainName"/acatalog/404error_Page_Not_Found.html

    and I should have used a relative URL:

    ErrorDocument 404 /404error_Page_Not_Found.html

    However, changing the URL to a relative one corrects the response code and gives a genuine 404 but the page no longer displays properly: no graphics, no sidebars, only text links without buttons etc. (similar to pages that deliver secure and un-secure content?) I've tried a relative URL with and without /acatalog with identical results.

    Can anyone advise on how to correct the display issues please?
    Any help or advice appreciated as always.

    For the time being I've left it returning the 200 response so at least it looks ok to customers, but if you need to see an example of what I mean I can change the .htaccess.
    flyingbooks secondhand, rare and collectable aviation books and publications

    If you always do what you always did, you'll always get what you always got

    #2
    I imagine it will be you link to the css within the page code that's causing you the issue.

    I generally create 404 pages as a brochure page when using actinic, then hide them in the navigation.

    What you end up with is 404 that fits in exactly with the rest of your site and easily edited/maintained. You could even litter it with marketing lists or fragment promoting your wares...

    Army Gore-tex
    Winter Climbing Mitts
    webD's Blog: Website design, SEO and other ramblings…
    Twitter LinkedIN

    If you think a post is good, rate it!

    Find the answers in the Knowledge Base | Have you read the User Guides

    Comment


      #3
      Thanks for the reply Rich. My 404 page is a hidden brochure page as you suggest.

      The link to CSS is the same in the 404 page as it is in any other as far as I can tell:
      <link href="actinic.css" rel="stylesheet" type="text/css">

      The bit I don't get is why it displays ok with a full URL in .htaccess but not with a relative one. Admittedly, I'm right on the edge of my very limited talent though
      flyingbooks secondhand, rare and collectable aviation books and publications

      If you always do what you always did, you'll always get what you always got

      Comment


        #4
        Code:
        ErrorDocument 404 /acatalog/404.html
        Try that

        Army Gore-tex
        Winter Climbing Mitts
        webD's Blog: Website design, SEO and other ramblings…
        Twitter LinkedIN

        If you think a post is good, rate it!

        Find the answers in the Knowledge Base | Have you read the User Guides

        Comment


          #5
          Thanks again Rich, I've already tried:

          ErrorDocument 404 /acatalog/404error_Page_Not_Found.html
          and
          ErrorDocument 404 /404error_Page_Not_Found.html

          they both fix the soft 404 but wreck the page. I guess it must be something I did to the layout when I edited the content of the page; removed shopping cart summary, new products, best sellers, and added a search box etc......
          flyingbooks secondhand, rare and collectable aviation books and publications

          If you always do what you always did, you'll always get what you always got

          Comment


            #6
            Have you tried selecting a different page layout? Make sure it's the same layout as your About page and see if that helps.

            Army Gore-tex
            Winter Climbing Mitts
            webD's Blog: Website design, SEO and other ramblings…
            Twitter LinkedIN

            If you think a post is good, rate it!

            Find the answers in the Knowledge Base | Have you read the User Guides

            Comment


              #7
              Funnily enough, whilst thrashing around the gym this morning, I'd decided to try that very thing!
              I'll use a standard brochure page layout and try editing/testing against the relative url as I go; maybe that will tell me where I went wrong last time.
              (In fairness, I did test-as-I-went-along originally and thought everything was ok. I didn't have the layout problem until I found out about the soft 404's and changed to the relative url.) I'll post back with results next week. Thanks again.
              flyingbooks secondhand, rare and collectable aviation books and publications

              If you always do what you always did, you'll always get what you always got

              Comment


                #8
                Morning all!
                It wasn’t a problem with the layout, it all comes down to absolute and relative url.

                I am not suggesting for one minute that the following is the "right" explanation (I don't know enough to suggest that it is) but after much reading and experimentation, my understanding of it is this:

                1: htaccess must use a relative url to return the correct response code.

                2: Links in your custom 404 page must be absolute, not relative. Because your page can be loaded from various directories, an absolute url works, but a relative one may not.

                So, for instance, this:

                <link href="actinic.css" rel="stylesheet" type="text/css">

                doesn’t work (You were right about the css link Rich)

                My solution was to make the link to css absolute, and to remove the “brochurelogo” and “companylogo” variables and use absolute urls in their place. As this was the only image used in my 404 page it was relatively simple to do; if you have a lot of images such as image buttons, best sellers etc in the page I imagine it will get more complicated.

                I find it odd that I appear to be the only one with this problem, but that's how I solved it and I hope it helps someone else sometime.
                flyingbooks secondhand, rare and collectable aviation books and publications

                If you always do what you always did, you'll always get what you always got

                Comment


                  #9
                  I'd suggest that all your problems stem from a borked basehref. With a base href in place each URL is effectively a full one. There were previous base href problems on sites (details in forum if you are interested), so i'd guess at you not running 9.0.5 also.

                  Comment


                    #10
                    My solution was to make the link to css absolute, and to remove the “brochurelogo” and “companylogo” variables and use absolute urls in their place. As this was the only image used in my 404 page it was relatively simple to do.....
                    but you now have unauthenticated errors on your ssl pages as you are referencing http for the logo and not https. this throws up a HUGE error message for IE users.

                    All referencing has to be relative

                    Comment


                      #11
                      if your base ref is working properly then the index page will have code as follows

                      <Actinic:BASEHREF VALUE="http://www.xxx.co.uk/" FORCED=1 />

                      <script language="javascript" type="text/javascript" src="acatalog/actiniccore.js"></script>

                      <link href="acatalog/actinic.css" rel="stylesheet" type="text/css">


                      <body onload="PreloadImages('acatalog/button_back_highlight.gif',
                      and your acatalog index will have....
                      <Actinic:BASEHREF VALUE="http://www.xxx.co.uk/acatalog/" FORCED=0 />

                      <script language="javascript" type="text/javascript" src="actiniccore.js"></script>

                      <link href="actinic.css" rel="stylesheet" type="text/css">

                      <body onload="PreloadImages('button_back_highlight.gif',

                      Comment


                        #12
                        Thanks for the replies folks.

                        I've had a look at a couple of threads re Base Ref and they look ok. Checks out with Jo's previous post also.

                        Lee, I'm using Catalog 9.04 at the mo'

                        As the great Clint Eastwood once said: "...a man's got to know his limitations." so I've reverted to an earlier snap shot, which undoes my "fix" and I've also removed the custom 404 and the related .htaccess file. Google's 404 will just have to do for now.
                        flyingbooks secondhand, rare and collectable aviation books and publications

                        If you always do what you always did, you'll always get what you always got

                        Comment

                        Working...
                        X