Forum Moderators: phranque

Message Too Old, No Replies

https and htaccess redirection

https and htaccess redirection

         

CainIV

7:54 am on Nov 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello everyone. I have a somewhat unique problem I am hoping one of the experienced members here can help me with.

I have a website that sells widgets, and is experiencing the www / non www issue.

However, when I use the htaccess code supplied here to redirect non www to www, then the shopping cart I use fails to work properly:

Item page:

www.widgets.com/store/cart.php?xid=someid

Nornally clicking "buy now" clicking transfers to

[widgets.com...]

However, because this redirect is in place, orders cannot process with the htaccess setup this way.

Is there a workaround for me for https:// addresses, possibly an IF statement in the htaccess file that allows one to transfer to https:// without the htaccess automatically redirecting to www?

I appareciate all opinions and solutions here

Regards
CainIV

chirp

1:29 pm on Nov 4, 2005 (gmt 0)



Add the following before your RewriteRule:

RewriteCond %{SERVER_PORT} !443

That's your 'if' ;)

CainIV

8:55 pm on Nov 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks so much, that works brilliantly!

CainIV