Forums / General Questions / redirect 301 working on one store but on the other

redirect 301 working on one store but on the other

Views: 1,861

Results 1 to 4 of 4
9 Aug 2012, 8:37 PM
#1
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

redirect 301 working on one store but on the other

Hi everyone. So a client I'm working with needed help with a redirect. I've successfully implemented a redirect of a page that no longer exists in another store and thought it would work the same here. But it's not working at all and I'm wondering if it could be because of a difference in where the store was installed. The previous store was installed in the root public_html and the store I'm working on now is in a domain subfolder (/secondstore.com/)

In the first store was able to add the following CODE to the htaccess_for_page_not_found_redirects.htaccess file in the extras/ folder and it works!

redirect 301 /products.html http://firststore.com/index.php

In the new store they want to redirect a page that never existed. They wanted to basic create a link https://www.secondstore.com/ManufacturerName/ and redirect it to Zen Cart Url https://www.secondstore.com/index.php?main_page=page&id=19&chapter=2

So naturally I just put the following line of code into the htaccess_for_page_not_found_redirects.htaccess file in the extras/ folder for this store.

redirect 301 /ManufacturerName http://www.secondstore.com/index.php?main_page=page&id=19&chapter=2

The result is

Not Found

The requested URL /ManufacturerName was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And I can't figure what the difference is. I do notice when I compare the two config files the 1st store has HTTP_SERVER defined without the www. and this second has the HTTP_SERVER configured with the www. (not sure if that if part of the problem.)

Any Ideas?

Thanks,
Andy

9 Aug 2012, 9:09 PM
#2
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

Re: redirect 301 working on one store but on the other

I see the first redirect is from a specific .html page to your site main page. The second redirect doesn't have an extension. What type of page is that /manufacturername ?

10 Aug 2012, 5:14 PM
#3
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Re: redirect 301 working on one store but on the other

Thanks for your replay JoeJoeJoe -

Manufacturename/ represents a folder. I did try entering Manufacturename/index.html but that didn't work either. Researching the "redirect 301" online I did find that using the structure "folder/" should work since "folder/index.html" would be the file that would be implied.

Just now I tried putting a real page in place of Manfacturername/ do see if it would redirect from and existing page on the site but it didn't work. That's why I'm thinking that it in this case the .htaccess file isn't even being accessed period.

Another thing I JUST read somewhere is that the .htaccess requires Apache. I'll take a look at the hosting service to see if it includes that.

10 Aug 2012, 7:18 PM
#4
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Re: redirect 301 working on one store but on the other

I got it to work with my original line of code. I'll come back and post what I did later.