Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Domain change, SEO and new oscommerce site version


valquiria23

Recommended Posts

Morning,

So it sounds like you have two hosting environments?  Each with their own separate .htaccess files?

If the above is true then you'll need different rules in both those files (not the same rules), otherwise you'll cause a infinite redirect loop.  If you have the 301 redirect in both files then that could be the cause of the internal server error.

In your old site you only need the following:

RewriteEngine On 
RewriteBase /catalog/

RewriteRule !^catalog/admin($|/) https://www.newdomain.com%{REQUEST_URI} [L,R=301]

Because it's only purpose now is to redirect all the traffic to the new site (apart from /admin).  Also if you're using RewriteBase /catalog/ then you may only need to have the last line as..

RewriteRule !^admin($|/) https://www.newdomain.com%{REQUEST_URI} [L,R=301]

Because it's using the previous rule (RewriteBase) as a base/starting point for proceeding rules.  So experiment with "catalog/admin" and then just "admin".

Then in the new site you'd have this:

RewriteEngine On 
RewriteBase /catalog/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

If that still doesn't work then please do as MrPhil suggested and post contents of both your .htaccess files and we'll soon get to the bottom of it.

If it still don't work, hit it again!

Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information.

Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here.

Link to comment
Share on other sites

Dear  @peterbuzzin,  @MrPhil , @Hotclutch  

thank you very much for your help.

The RewriteRule :

RewriteEngine On 
RewriteBase /catalog/

RewriteRule !^admin($|/) https://www. newdomain.com%{REQUEST_URI} [L,R=301]

did the magic impeccably. :) 

The problem I had was that the other RewriteRule in the old domain (on the old hosting) they were interfering.

I deactivate the old RewriteRule and voilà!!!

Best regards.

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

Fantastic! Glad it's all working for you now :)

If it still don't work, hit it again!

Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information.

Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...