Question .htacess file

User 2765857 Photo


Registered User
614 posts

Hello all,

In the process of making site leaner, 25 pages done so far and I think I can remove about 20 that are not really necessary anymore. I do have Google telling me that one page that I have redirected for years is not the right way and gave us a warning. Ok no big thing I think BUT this is Google :/ so I am in the process of trying to do it the correct way by using the 301 redirect file.

Is this the correct way? I made the .htacess file using notepad, added :
RewriteEngine On ( is this neeeded ?) Then 2 lines down I added.

Redirect (space) /links2.html(space) htpp://kreation*******/links.htm ( do I have to also add www ?)

All will be uploaded to my root directory.

If I wanted to add more 301's I just add below what I did ...correct?
I really appreciate ALL the help given on this forum, as a Newbie I could not have been able to work with .RSD at all Thank You all!

Ray ( Newbie still trying to learn ) :)
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 187934 Photo


Senior Advisor
20,188 posts

Here's how I did one for some PDF's that were moved to be more organized.
Redirect 301 /old_one.pdf http://mydomain.com/pdf/new_one.pdf
Redirect 301 /old_two.pdf http://mydomain.com/pdf/new_two.pdf
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2765857 Photo


Registered User
614 posts

Eric Rohloff wrote:
Here's how I did one for some PDF's that were moved to be more organized.
Redirect 301 /old_one.pdf http://mydomain.com/pdf/new_one.pdf
Redirect 301 /old_two.pdf http://mydomain.com/pdf/new_two.pdf


Eric thanks for responding, adding the 301 in front of Redirect I guess that is the better way and that is what i will use.
You ever see that "RewriteEngine On" to be added ? I saw that someplace when I was searching for 301 redirect info and just wondering if is necessary?

If that is all I need wow that is so Simple that even a Newbie can do it :D or not.

Ray
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 187934 Photo


Senior Advisor
20,188 posts

Yes keep the RewriteEngine On at the top. It should work without it for what your doing but I would keep it on there for future needs.
This is one I would place on your .htaccess
IndexIgnore *
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2765857 Photo


Registered User
614 posts

Eric Rohloff wrote:
Yes keep the RewriteEngine On at the top. It should work without it for what your doing but I would keep it on there for future needs.
This is one I would place on your .htaccess
IndexIgnore *


Thanks again Eric,
Will keep on top as you said, thanks.
The indexIgnore * as a Newbie what is the reason for me to add that also?:rolleyes: I know you have future use is it for any page that I do NOT want engines to index etc.?
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 2765857 Photo


Registered User
614 posts

By the way Eric forgot to tell you....:( This Newbie Dummie forgot to add 2 c's in access SO when I uploaded the file it was not working, another thing learned ( I think) :rolleyes:

Ray ( Newbie slowly Learning by mistakes)
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 187934 Photo


Senior Advisor
20,188 posts

The IndexIgnore * will block browsers from being able to view your directories without having that actual direct link to the page or file.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2765857 Photo


Registered User
614 posts

Eric Rohloff wrote:
The IndexIgnore * will block browsers from being able to view your directories without having that actual direct link to the page or file.


Thanks again Eric for sharing your expert knowledge!

I do have one last question, I did the .htaccess and just to see if it works ( I did not add the IndexIgnore* yet)
When I add in FF or Chrome http://www.kreationspecialties.com/links2.html it DOES redirect to the page I wanted BUT not in IE 11 ??? That come with Page Not Found.

I also added our index page to redirect from .html to .htm ( we have used .htm for over 15 years) and that DOES work on all browsers including IE 11.

Do you think at this time since we really have not used that links2 page I should delete it?

Ray ( Newbie confused again :rolleyes: )

Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 187934 Photo


Senior Advisor
20,188 posts

It redirects for every browser I tried. IE FX Chrome
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2765857 Photo


Registered User
614 posts

Eric Rohloff wrote:
It redirects for every browser I tried. IE FX Chrome


Great I appreciate you checking, something like this happened once before, IE 11 for some reason acted up on this computer BUT was normal on 2 others??

At least I know I did it right :D

Thanks, Ray
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.