Log in

View Full Version : ReWriteRule in E-Comm Site



Diversions
03-29-2008, 09:01 PM
I am building an e commerce site on a secure server. There is something in the php that is forcing product pages to open up in https: rather than http: causing a problem with google since they do not list secure pages.
While I am still looking for the problem, I was thinking that, as a temporary solution I could ReWriteRule through the .htaccess but have no idea how I would create the string.

Presently, these are the rewrites sitting in htaccess which were actually put up by the host so I cannot claim brilliance over them. For all I know, one of these lines is throwing the http://www.ayl.com/productA.php into https://www.ayl.com/productA.php

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-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

I am hoping that a wise guru here can help me out.

What I would like to accomplish is to direct all pages not associated with purchasing or data transmission to the non-ssl page.

Is this possible?

Thank you for your help!
D

alexjewell
03-30-2008, 11:16 PM
I don't see anything in those rewrites that would do that...

Diversions
03-30-2008, 11:37 PM
Problem and issue has been resolved The issue arose in an admin file.