Announcement

Collapse
No announcement yet.

Htaccess redirect issue

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

    Htaccess redirect issue

    Hi guys,

    I've searched through this forum and been to many sites from google regarding htaccess this morning and can't seem to get this right.

    Am trying to setup a 301 .htaccess redirect from the standard index.html file to my /acatalog/index.html file.

    So far I have created a file entitled ".htaccess", placed this in my "web" directory on my hosting server (names.co).

    In the file I have:

    "Redirect 301 index.html http://www.bathsource.co.uk/acatalog/index.html"

    and nothing else.

    I have also removed all content from my index.html page to see if this was the issue (I have no idea why but have got it backed up).

    It is not redirecting still and I can't seem to work out what I am doing wrong - is the path I have provided for my index.html file incorrect somehow???

    Sorry to bring up a topic that seems to be extensively covered on this forum already but I can't seem to get it to work still and don't want to go down the whole meta redirect route really!

    Would appreciate any pointers in the right direction!

    Greg.

    #2
    Three things I can think of to check:

    1. Try a / before index.html

    2. make sure you're on a UNIX server and not windows

    3. Make sure your web host allows you to use .htaccess files

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      I think you want:

      Redirect 301 /index.html http://www.bathsource.co.uk/acatalog/index.html

      Notice the leading slash.
      David
      Mandrake Press Ltd

      <a href="http://www.mandrake-press.co.uk" target="_blank">www.mandrake-press.co.uk</a>

      Comment


        #4
        Thanks Mike & David,

        I knew it'd be some annoying syntax that I couldn't spot!

        That seems to be placing the correct URL in the browser now but strangely not bringing up the actual page.

        If I then highlight the address in my browser bar and hit enter it then loads the correct page....

        Sorry to be an absolute pain - any suggestions?

        Comment


          #5
          Putting www.bathsource.co.uk in my browser address bar took me straight to your acatalog index page so it appears to be working for me.
          David
          Mandrake Press Ltd

          <a href="http://www.mandrake-press.co.uk" target="_blank">www.mandrake-press.co.uk</a>

          Comment


            #6
            OK - now I'm really ocnfused.

            Just tested it out on various machines around the office - on mine and one other it doesn't seem to load as per my earlier description.

            But on two others it goes through to the right page....

            Could this be some sort browser setting that I and my colleague have?

            Comment


              #7
              I'd recommend clearing your cache and trying again.
              David
              Mandrake Press Ltd

              <a href="http://www.mandrake-press.co.uk" target="_blank">www.mandrake-press.co.uk</a>

              Comment


                #8
                You could check your IE settings for temporary Internet Files as it's possible that's still cacheing the old page.

                Mike
                -----------------------------------------

                First Tackle - Fly Fishing and Game Angling

                -----------------------------------------

                Comment


                  #9
                  Thanks again guys.

                  Yep that has done the trick. It now loads up fine having deleted the temp internet files.

                  But it does beg the question - does this mean a large proportion of my potential customers will be greeted by a blank page when they type www.bathsource.co.uk??? That would not be a good thing!!

                  Thanks for all the advice once again!

                  Comment


                    #10
                    It's not just because of the cached files but more likely because of the settings you have. You should have IE set to get a fresh page either on 'automatic' or 'always' rather than 'on power up' or 'never'.

                    Take a look at your settings as this could be why you had a problem. I'd expect IE to follow the redirect with either of the two recommended settings.

                    Mike
                    -----------------------------------------

                    First Tackle - Fly Fishing and Game Angling

                    -----------------------------------------

                    Comment

                    Working...
                    X