Announcement

Collapse
No announcement yet.

htaccess again...

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

    htaccess again...

    I have this line in my htaccess file in the root of my domain:
    ErrorDocument 404 /Page_Not_Found.html
    which works fine for a page not found relative to the root, say:
    www. domain.co.uk/rubbish.html
    but it does not work if the page not found is:
    www. domain.co.uk/acatalog/rubbish.html
    In this case it just redirects automatically to my root domain homepage.

    I have a copy of the error page in both the root and acatalog.

    This is with 1and1 BusPro.

    Any ideas how I can make this work please?

    EDIT: Update - even after removinbg the htaccess file completely then an acatalog page not found still redirects to my root homepage. Is it something to do with 1and1??

    EDIT2: Update - sorted this, it's now ok - I had another copy of htaccess in the acatalog folder.

    #2
    .htaccess is folder specific - do you have an .htacess file in the acatalog folder? With the same ErrorDocument redirection?
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      That's exactly what I had Bill. Thanks.

      Comment


        #4
        Sorry Duncan,

        Are you saying there is a .htaccess file in each folder and both point 404 errors at the /Page_Not_Found.html file, but this is NOT working?

        BTW that dummy domain name does resolve (to a SEDO 404 page) - you may want to break the links by adding a space between the http and the rest of the name.
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          The problem was that I had forgotten that I had previously put a .htaccess file in acatalog as well as the root. I have now removed it and only have a .htaccess file in the root which works fine in all cases.

          So:
          www. fancylines.co.uk/acatalog/rubbish.html
          and:
          www. fancylines.co.uk/rubbish.html
          both work fine. (without the space in the URL)

          Comment


            #6
            I have one .htaccess file at the root of my site. I'll have to check when I get home but I think my redirect is something like :

            ErrorDocument 404 /http://www.mydomain.co.uk/404.html

            This works for documents requested from the root of my site or from within the acatalog folder.

            It also seems to satisfy Google which was previously complaining that missing pages were returning a status of 200 'Found'.

            I'll double check my set up later this evening and post it here as I know we share a similar setup Duncan (1and1 hosting etc).

            regards
            Dave

            Comment


              #7
              Originally posted by Big_Dave
              I have one .htaccess file at the root of my site. I'll have to check when I get home but I think my redirect is something like :

              ErrorDocument 404 /http://www.mydomain.co.uk/404.html

              This works for documents requested from the root of my site or from within the acatalog folder.

              It also seems to satisfy Google which was previously complaining that missing pages were returning a status of 200 'Found'.

              I'll double check my set up later this evening and post it here as I know we share a similar setup Duncan (1and1 hosting etc).

              regards
              Dave
              I have all this working fine now. I had an htaccess file in both the root and acatalog which was causing me to think it wasn't working.

              Also I'm sure someone mentioned the other day on the forum that the 404 error page needs to be a relative address not an absolute URL. So I have uploaded my error pages to the root and just used for example:
              ErrorDocument 404 /Page_Not_Found.html
              which works regardless of the path.

              Comment

              Working...
              X