Announcement

Collapse
No announcement yet.

Custom error pages

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

    Custom error pages

    Any thoughts on the best way to do custom error pages on an Actinic site?

    I wanted to cater for the fact that I changed a lot of section pagenames recently with a 'pretty' 404 page so I edited my home page to have an 'oops' message on it, uploaded the site, renamed index.html, restored the original home page layout and uploaded again.

    The result is a 404 page that looks like this: http://www.cka-net.com/404.html (it isn't 'live' yet; I'm waiting for the hosting to catch up.)

    Was this a really long-winded way of doing things? I can't see how to create an arbitrary page inside Actinic.

    Justin
    -
    Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
    http://www.cka-net.com

    #2
    Just create a new brochure page exclusively for the 404 page and reference that to be used on your server.

    Comment


      #3
      Often you can even get rid of most of the navigation and just have fixed links to the sitemap, search page and homepage instead which means you don't have to update it very often, if ever.

      Comment


        #4
        Originally posted by leehack View Post
        Just create a new brochure page exclusively for the 404 page and reference that to be used on your server.
        Some servers only allow error pages to be in the root though unfortunately. 1and1 are (or least were) like that.

        Comment


          #5
          Really, ah ok, never encountered that myself, i must have been lucky. Cheers.

          Comment


            #6
            Originally posted by leehack View Post
            Just create a new brochure page exclusively for the 404 page and reference that to be used on your server.
            I should have mentioned that my hosting requires the error page to be at the root. Brochure pages are in /acatalog/ so that wouldn't work.

            Justin
            -
            Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
            http://www.cka-net.com

            Comment


              #7
              Originally posted by drounding View Post
              Often you can even get rid of most of the navigation and just have fixed links to the sitemap, search page and homepage instead which means you don't have to update it very often, if ever.
              Sorry - not sure what you mean here?

              Justin
              -
              Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
              http://www.cka-net.com

              Comment


                #8
                Custom 404 page in site root

                Make your custom 404 page in Actinic and publish.
                Browse to your new 404 page.
                Click 'View' 'Source'
                Ctrl A and copy the whole lot.
                Paste into a new page in Dreamweaver (code view).
                Make a folder in My Documents called acatalog.
                Save the page you have just made into this acatalog folder.
                Don't look at the design tab, it will look rubbish!
                Now 'save as' in My Documents.
                Dreamweaver will ask if you want to update links.
                Say yes.
                Upload the new page from My Documents to the site root.
                All being well it should display correctly and the links should work.
                Only issue is if you make changes to the site involving navigation you will have to remake the 404 page.

                Hope this is no too complicated.
                Jonathan Chappell
                Website Designer
                SellerDeck Website Designer
                Actinic to SellerDeck upgrades
                Graphicz Limited - www.graphicz.co.uk

                Comment


                  #9
                  Originally posted by graphicz View Post
                  Make your custom 404 page in Actinic and publish.

                  Hope this is no too complicated.
                  Thanks for the suggestion. I did try this and had trouble get the links to work. I also decided it wasn't any easier than what I'm doing.

                  Justin
                  -
                  Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
                  http://www.cka-net.com

                  Comment


                    #10
                    Originally posted by leehack View Post
                    Just create a new brochure page exclusively for the 404 page and reference that to be used on your server.
                    Maybe I'm missing something but if I created a new brochure page wouldn't it want to appear in the left side-bar?

                    Justin
                    -
                    Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
                    http://www.cka-net.com

                    Comment


                      #11
                      http://community.actinic.com/showthread.php?t=45312

                      Just for completeness, my post above assumes acatalog is one level above site root.
                      I have also had 404 pages where all the links need to be full links including the http://www.etcetcetc
                      Jonathan Chappell
                      Website Designer
                      SellerDeck Website Designer
                      Actinic to SellerDeck upgrades
                      Graphicz Limited - www.graphicz.co.uk

                      Comment


                        #12
                        OK well I've had a bit of a frustrating day with all this. Having created my custom 404 page (you can see it for yourself by typing something like

                        http://www.cka-net.com/for-petes-sake.html

                        i.e. a non-existent page) I needed to modify .htaccess appropriately. Cue a script kindly provided by the hosting provider, which I thought would be a better route forward than messing with it by hand. This script is so poorly designed and documented that the host concerned should fire the person that wrote it.

                        The hosting control panel invites you to choose a folder to put the script in - so obviously I made a new folder and put it in there - I'm a bit of a pedant you see. What you don't realise is that it will create/modify a .htaccess file in that folder, not at the root where it would need to be to define a custom error page.

                        Because my FTP client refused for most of the day to allow me to display hidden files I didn't realise this - and so much time and money was spent on the phone waiting in the queue for support (but at least I got to watch Atlantis come home for the last time, live - near the top of today's to-do list).

                        When I actually look at .htaccess, this is what the script created:

                        Code:
                        # Created with HTAdmin v4.0.20050909
                        # HIDE THE CONTENTS OF THIS FILE FROM BROWSERS
                        <FilesMatch ^\.ht.*>
                        order deny,allow
                        deny from all
                        </Files>
                        # SET THE CUSTOM ERROR PAGE PATHS
                        ErrorDocument 404 not_found.html
                        # SET THE PATHS FOR PASSWORD PROTECTION ROUTINES
                        # PASSWORD PROTECTION
                        # END OF TEMPLATE
                        # DO NOT MODIFY ABOVE THIS LINE BY HAND!!!
                        Note the last line. Oh yeah? I think I will in the future, Mr. Script.

                        Having finally sorted all this out around lunchtime I thought that was that - until I discovered this evening that, also without mentioning this anywhere, the damn script had been modifying my robots.txt, adding

                        Code:
                        User-agent: *
                        Disallow: /
                        to the end - repeatedly - every time I ran the script (so there were about 5 of these in the file). A separate function of the script - which I hadn't touched - was to password-protect folders. Looks like it executed a bit of that part of the script by mistake...

                        I found this out when I added a few more products and re-issued my sitemap.xml. I looked at Google Webmaster to check it had been submitted, only to be told that robots.txt now excluded the crawler from the whole site, instead of just the cgi-bin and image folders.

                        Do you ever have one of those days when you wish you hadn't even turned the computer on? How often does Google update its copy of robots.txt?
                        -
                        Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
                        http://www.cka-net.com

                        Comment


                          #13
                          Which hosting company? Sounds a nightmare.

                          BTW, an htaccess I use is this:
                          Remember, only on Linux. Windows servers are very different.
                          Code:
                          RewriteEngine On
                          RewriteCond %{http_host} !^www.your-domain.com$ [nc]
                          RewriteRule ^(.*)$ http://www.your-domain.com/$1 [r=301,nc,L]
                          RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
                          RewriteRule ^index\.html$ http://www.your-domain.com/ [R=301,L]
                          ErrorDocument 401 http://www.your-domain.com/acatalog/not-found.html
                          ErrorDocument 400 http://www.your-domain.com/acatalog/not-found.html
                          ErrorDocument 403 http://www.your-domain.com/acatalog/not-found.html
                          ErrorDocument 500 http://www.your-domain.com/acatalog/not-found.html
                          ErrorDocument 404 http://www.your-domain.com/acatalog/not-found.html
                          Jonathan Chappell
                          Website Designer
                          SellerDeck Website Designer
                          Actinic to SellerDeck upgrades
                          Graphicz Limited - www.graphicz.co.uk

                          Comment


                            #14
                            Thanks I will be doing some custom error pages when time permits thsi could be very useful.
                            Steve Griggs.

                            "People in business often miss opportunities, mainly because they usually arrive dressed in overalls and looking like work."



                            www.kitchenwareonline.com
                            www.microwave-repair.co.uk

                            Comment


                              #15
                              Originally posted by graphicz View Post
                              Which hosting company? Sounds a nightmare.
                              Actually it's namesco. I have a customer who has virtual server hosting with them and the support is pretty good. My hosting is the standard variety and the support people aren't very clued up so there are obviously at least two support departments depending on how much you're spending with them.

                              The postscript to my rant last night is that it takes 24 hours for Google to refresh robots.txt so it is correct again now. During those 24 hours though, 49% of my products got disallowed on Google merchant centre because of the crawler being blocked. It'll probably be Monday by the time they're back on.

                              Justin
                              -
                              Justin Hill (Half-to-three-quarters-baked Mac expert, laptop evangelist and vintage Hammond enthusiast)
                              http://www.cka-net.com

                              Comment

                              Working...
                              X