Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

/catalog redirects


BeachnGrub

Recommended Posts

We moved our site to the level below /catalog

but when you click on a link from google that has /catalog/example+session ID,

 

it gives an error

 

We setup a htaccess redirect file as follows..

 

RedirectMatch permanent ^/catalog$ http://www.ourstore.com

 

However when you click on a link like this..

 

www.ourstore.com/catalog/about_us.php?osCsid=ak6ce3434ac034a2351d97te3e453ae32

 

it shows a page could not be found..

 

if you copy and paste the above link without the catalog portion and put it into a browser, it will work just fine.

 

anyone understand htaccess that can help out?

Link to comment
Share on other sites

I think what you want instead is:

 

RedirectMatch permanent /catalog/(.*)^ http://www.ourstore.com/$1

 

I'll admit to being somewhat fuzzy on all these regexp strings, but the one you have just can't possibly be right.

Link to comment
Share on other sites

Just did this - steve almost had it.. it's:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^catalog/(.*) http://www.example.com [R=301,L]

</IfModule>

 

This will send people coming from any url after catalog/ back to the url of your choice, mine being my main page.

 

This is an absolutely critical rule for people to place in their roots htaccess file if they have had their site up for more than a couple weeks and are moving down to the root level from /catalog...otherwise the SEs will find many page could not be founds and penalize you. Your ranking will drop like a rock.

 

S

Link to comment
Share on other sites

I see I had the regex syntax a bit off, but I am a bit uncomfortable with redirecting all "old" links back to the main page. This will lose any PR you had for the old pages and may cause problems based on multiple pages seemingly redirected to the same page. It would be better to do a 301 redirect to a rewritten URL that goes to the correct new page, rather than the home page. That will maintain the PR and simply tell the search engines to update the URL in their index.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...