Forums / General Questions / Need help redirecting old htm pages (.htaccess)

Need help redirecting old htm pages (.htaccess)

Locked

Views: 2,755

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
17 Jun 2006, 5:19 PM
#1
oldschoolrocker avatar

oldschoolrocker

New Zenner

Join Date:
Sep 2005
Posts:
63
Plugin Contributions:
0

Need help redirecting old htm pages (.htaccess)

Hey guys,

I need to correctly redirect my old .htm pages to my new equivalent .php pages. My knowledge of Apache, .htaccess & mod_rewrite is VERY limited, so I really could use some help w/ this. I've spent countless hours searching SEO forums & reading various tutorials, but I can't seem to find a "simple" fix. I just don't have the time to learn a new coding language, and I don't want my ranking to plummet...

Example:

http://mydomain.com/new_cd.htm --TO--
http://mydomain/index.php?main_page=products_new

http://mydomain.com/dvd.htm --TO--
http://mydomain.com/index.php?main_page=index&cPath=66

http://mydomain.com/main_cd_s.htm --TO--
http://mydomain.com/index.php?main_page=index&cPath=65_91

http://mydomain.com/main_cd_t.htm --TO--
http://mydomain.com/index.php?main_page=index&cPath=65_92

etc, etc...

I know that there are friendlier ways to write 'page=index&cPath=65', but it's beyond me; not sure about the query strings or the inclusion of www. either...

If someone could properly translate the above example, that would be great! My scrambled brain is currently incapable of processing detailed instructions - I just need a quick-fix-cheat-sheet! :smile:

I'm sure this will benefit others, as well.

My sincerest thanks to anyone who can help me w/ this!!!

18 Jun 2006, 4:18 AM
#2
wilderdom avatar

wilderdom

New Zenner

Join Date:
Sep 2005
Posts:
28
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

I have a very simple .htaccess file in my root directory for redirects

It goes like this

Options +Includes
XBitHack on
redirect 301 /Experiential.html http://www.wilderdom.com/experiential
redirect 301 /games/gamesspecific.html http://www.wilderdom.com/games
etc.

(those aren't meant to be active urls, its just meant to be text, but i can't seem to edit out the [url] tags)

ZC 1.3.7|The Wilderdom Store

18 Jun 2006, 7:22 PM
#3
oldschoolrocker avatar

oldschoolrocker

New Zenner

Join Date:
Sep 2005
Posts:
63
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

wilderdom:

I have a very simple .htaccess file in my root directory for redirects

It goes like this

Options +Includes
XBitHack on
redirect 301 /Experiential.html http://www.wilderdom.com/experiential
redirect 301 /games/gamesspecific.html http://www.wilderdom.com/games
etc.

(those aren't meant to be active urls, its just meant to be text, but i can't seem to edit out the [url] tags)

Thanks, wilderdom. What I really need is a redirect for my pages + query strings (as listed in my initial post). I know there are a number of ways to do this, but I'm looking for the best & easiest way. In the interim, prissy little googlebot steps further & further away.... What a p.i.t.a.....

30 Jun 2006, 7:09 AM
#4
justwade avatar

justwade

Zen Follower

Join Date:
Oct 2005
Posts:
206
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

1.27d

I am in simalar situation, with little success with forum search.

I went to Cpanel and I had success redireting my /index.htm to /index.php file.

But if I try to redirect something like "www.mywebsite/products.htm" over to- "www.mywebsite/catalog/index.php?main_page=product_info&cPath=1&products_id=1"

then I get a 404 Not Found error when tested.

Also the Cpanel redirect for last example shows (product_info&cPath) instead of (pemanent).

Any feedback much appreciated.

Justwade
Zen 1.5.5f
Zen 1.3.9h*, Zen 1.27 + (did that, done with that)*

30 Jun 2006, 9:31 AM
#5
justwade avatar

justwade

Zen Follower

Join Date:
Oct 2005
Posts:
206
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

1.27d
No SEO contrib
or SEFU or
whatever url tweeks

Well I learn by expermenting and when I don't find any easy answers. I hope I am doing this right.

I figured out that Cpanel redirects don't work to good with ? and the like.

So I tried a few anyway in Cpanel and then looked at the .htaccess file to see what it did. First time I have even looked at the file.

And from a post tip on my host site, I learned to change all the "RedirectMatch ..." lines at the bottom.

I should say that you want to just remove em if you made any in your expermenting.

First, I put a folder nearby and put the original .htaccess file in it, (just in case)

Then with a copy put near the bottom;

Redirect permanent /your_old_file_name.htm http://www.your_website.com/catalog/your_new_page......... (whatever new url)

and just repeat this down a list with the old file name followed with one space the new url that you just copy a choice from your site. The above example was one line with one space after .htm. I tested now and then to see what happens and it worked when I did it exactly right, (with cut and pasting file names you can still make mistackes).

Oh and becareful you don't go back to your cpanel redirect and mess it up, did that but worked on copy on PC and had back up. Start with NO redirects in Cpanel. I suppose I will throw away my copy in the folder on server.... well maybe tomorrow, when I see if I made a security hole or something.

Appears to work ok,

Now, for my own paronoid satisfaction, how hard is it for someone to just come in and hyjack a site ths way?

Justwade
Zen 1.5.5f
Zen 1.3.9h*, Zen 1.27 + (did that, done with that)*

30 Jun 2006, 9:45 AM
#6
justwade avatar

justwade

Zen Follower

Join Date:
Oct 2005
Posts:
206
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

Say oldschoolrocker,

Using your examiples I assume that you would change in the .htaccess file the following additions.

Redirect permanent /new_cd.htm
http://mydomain/index.php?main_page=products_new

Redirect permanent /dvd.htm
http://mydomain.com/index.php?main_page=index&cPath=66

Redirect permanent /main_cd_s.htm
http://mydomain.com/index.php?main_p...ex&cPath=65_91

Redirect permanent /main_cd_t.htm
http://mydomain.com/index.php?main_p...ex&cPath=65_92

But its late, I am tired and I now see wilderdom answered it another way that should work.

Justwade
Zen 1.5.5f
Zen 1.3.9h*, Zen 1.27 + (did that, done with that)*

30 Jun 2006, 10:09 AM
#7
justwade avatar

justwade

Zen Follower

Join Date:
Oct 2005
Posts:
206
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

I just learned that my guests online is adding up with just me relinking to site. I must have done something wrong. I checked in admin and there I am 5 or 6 times.

Does this htaccess file control this somehow?

Justwade
Zen 1.5.5f
Zen 1.3.9h*, Zen 1.27 + (did that, done with that)*

1 Jul 2006, 2:28 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help redirecting old htm pages (.htaccess)

Every active session is considered an active guest/customer

Load your site 10 times and you are there 10 times ... each of you will fall off as the session expires ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Jul 2006, 3:09 AM
#9
justwade avatar

justwade

Zen Follower

Join Date:
Oct 2005
Posts:
206
Plugin Contributions:
0

Re: Need help redirecting old htm pages (.htaccess)

I did notice later that the guest list dropped off in a delayed fashion over a short period of time. And it appeared to do the same in admin "whos online"

Thanks for your reply,

Wade

Justwade
Zen 1.5.5f
Zen 1.3.9h*, Zen 1.27 + (did that, done with that)*