Zen Cart Logo
Forums / All Other Contributions/Addons / Ultimate SEO Module + htaccess 301 redirect issue

Ultimate SEO Module + htaccess 301 redirect issue

Locked

Views: 6,637

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Dec 2006, 10:32 PM
#1
justinanderson007 avatar

justinanderson007

New Zenner

Join Date:
Dec 2006
Location:
Wichita, KS
Posts:
8
Plugin Contributions:
0

Ultimate SEO Module + htaccess 301 redirect issue

I have successfully installed the Ultimate_SEO_URLs_v2.103 to my shopping cart installation (which is v1.36) located temporarily at http://d20578.u46.kansashosting.com.

We are getting ready to go live with the site but I need to redirect html pages that are indexed by google to the new html page names.

The problem that I am having is trying to redirect pages with .html extensions to the page names that are rewritten by the htaccess file fromUltimate SEO URL.

It works if I use .htm page for the original page and redirect to the new counterpart page.

Here is the code I am using in .htaccess file (after Ultimate SEO rewrite code):

redirect 301 /old_conditions.html [URL]http://d20578.u46.kansashosting.com/conditions.html[/URL]

so if you goto http://d20578.u46.kansashosting.com/old_conditions.html I want it to redirect to http://d20578.u46.kansashosting.com/conditions.html

It doesn't work, it goes to the page can not be found page!

But it does work as long as I use .htm as the page extension of the original page to reidrect from.

redirect 301 /old_conditions.htm [URL]http://d20578.u46.kansashosting.com/conditions.html[/URL]

if you go to http://d20578.u46.kansashosting.com/old_conditions.htm it redirects to http://d20578.u46.kansashosting.com/conditions.html

Can someone please help me figure out why I can't get a redirect from a .html page when using the Ultimate SEO URL module?

Thanks in Advance!

21 Dec 2006, 2:46 PM
#2
justinanderson007 avatar

justinanderson007

New Zenner

Join Date:
Dec 2006
Location:
Wichita, KS
Posts:
8
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

I found the solution!

The Ultimate SEO URLS is basically trying to rewrite any page (that's not a real page) that ends in .html.

Since all the links I need to redirect are .html pages as well, here is how I solved the issue:

In the /includes/classes/seo.url.php file, I replaced all references to .html to .htm and did the same in the .htaccess file.

This turned all of my zencart links into .htm files and now I can redirect a .html file to the corresponding .htm file.

I hope this helps someone else down the road looking to do the same thing.

:smartass:

4 Jan 2007, 2:24 AM
#3
a_n_onym avatar

a_n_onym

New Zenner

Join Date:
Sep 2006
Posts:
10
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

Does anyone have an automated way to redirect the old, ugly URLs to the new URLs, created with the Ultimate SEO URLs module? Or does the module include this option?

4 Jan 2007, 2:38 PM
#4
justinanderson007 avatar

justinanderson007

New Zenner

Join Date:
Dec 2006
Location:
Wichita, KS
Posts:
8
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

To the best of my knowledge the SEO module does redirect and rewrite the existing zencart URLS to the SEO friendly versions using the htaccess file.

3 Nov 2009, 10:09 AM
#5
rainmist avatar

rainmist

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

If we want to keep .html, is there any methods?

justinanderson007:

I have successfully installed the Ultimate_SEO_URLs_v2.103 to my shopping cart installation (which is v1.36) located temporarily at http://d20578.u46.kansashosting.com.

We are getting ready to go live with the site but I need to redirect html pages that are indexed by google to the new html page names.

The problem that I am having is trying to redirect pages with .html extensions to the page names that are rewritten by the htaccess file fromUltimate SEO URL.

It works if I use .htm page for the original page and redirect to the new counterpart page.

Here is the code I am using in .htaccess file (after Ultimate SEO rewrite code):

redirect 301 /old_conditions.html [URL]http://d20578.u46.kansashosting.com/conditions.html[/URL]

>  
> so if you goto [http://d20578.u46.kansashosting.com/old\_conditions.html ](http://d20578.u46.kansashosting.com/old_conditions.html)I want it to redirect to [http://d20578.u46.kansashosting.com/conditions.html ](http://d20578.u46.kansashosting.com/conditions.html)
>  
> It doesn't work, it goes to the page can not be found page!
>  
> But it does work as long as I use .htm as the page extension of the original page to reidrect from.
>  
> ```
redirect 301 /old_conditions.htm [URL]http://d20578.u46.kansashosting.com/conditions.html[/URL]

if you go to http://d20578.u46.kansashosting.com/old_conditions.htm it redirects to http://d20578.u46.kansashosting.com/conditions.html

Can someone please help me figure out why I can't get a redirect from a .html page when using the Ultimate SEO URL module?

Thanks in Advance!

31 Aug 2010, 3:02 PM
#6
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

I know its an old thread but there does not seem to be a solution and I have this issue...

I want to redirect some old website htm and html pages indexed in Google to the right pages. But any .html file is not working, it shows a Page Not Found. I put the redirect above any Ultimate SEO code in the htaccess file, so thought it would process that before anything else, but its not working.

So does anyone know how to redirect a htm and html files to a page on Zencart when using Ultimate SEO URLs? The following does not work, it shows page not found:
redirect 301 /default.html http://www.mysite-blahblah.com/

Thanks

31 Aug 2010, 3:12 PM
#7
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: Ultimate SEO Module + htaccess 301 redirect issue

Looks like this works OK instead of using redirect 301:

RewriteRule ^default.html$ http://www.mysite-blahblah.com/$1 [R=301,L]
RewriteRule ^default.htm$ http://www.mysite-blahblah.com/$1 [R=301,L]