Placing 301 redirect code

3 replies
I need some techy help to do a 301 redirect please.

On my website I have an index.html page ('Home' on the side menu) and then, following the 'Products" button on the side menu, I have my sales.html page.

Now I want to remove the present index.html page altogether
and redirect the sales.html to act as the index.html.
I also need the sales.html page to remain as sales.html because of the menu link.
(So my present sales page will be both Home=index and Products=sales according to the side menu bar.)

How do I do this?

If I do the 301 redirect through .htaccess will that suffice to disable the present index.html page or is there some other step I need to take, like create a blank index.html page first?

I also have the code for doing the redirect alternatively with php but again don't know where to insert it.

It's the step by step process of putting the code in the right place that has me baffled.

Looking forward to expert advice....
#301 #code #placing #redirect
  • Profile picture of the author SamirSM
    Originally Posted by marbar33 View Post

    I need some techy help to do a 301 redirect please.

    On my website I have an index.html page ('Home' on the side menu) and then, following the 'Products" button on the side menu, I have my sales.html page.

    Now I want to remove the present index.html page altogether
    and redirect the sales.html to act as the index.html.
    I also need the sales.html page to remain as sales.html because of the menu link.
    (So my present sales page will be both Home=index and Products=sales according to the side menu bar.)

    How do I do this?

    If I do the 301 redirect through .htaccess will that suffice to disable the present index.html page or is there some other step I need to take, like create a blank index.html page first?

    I also have the code for doing the redirect alternatively with php but again don't know where to insert it.

    It's the step by step process of putting the code in the right place that has me baffled.

    Looking forward to expert advice....

    You only need to add the code to the .htaccess page.

    Nothing needs to be done to the index.html page.

    You can either keep it blank, or as it is.
    {{ DiscussionBoard.errors[3179944].message }}
    • Profile picture of the author marbar33
      Thanks Indihow for taking the time to answer.
      .htaccess it will have to be then.
      {{ DiscussionBoard.errors[3190640].message }}
  • Profile picture of the author imediazone
    Banned
    Or you can use the redirects feature from your hosting account. It is very simple to use.
    {{ DiscussionBoard.errors[3190653].message }}

Trending Topics