Post by superwiiman » Mon Dec 08, 2014 9:53 pm

If your store redirects all traffic to a secure connection (using https) then you will need to add an exclude rule to ensure that the OpenBay Pro urls can still use http.

http://help.welfordmedia.co.uk/kb/openb ... -https-ssl

Within my htaccess file I have the following:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Could someone tell me how I would write an exclude rule for index.php?route=ebay/openbay/*

Thank you!

Newbie

Posts

Joined
Mon Dec 08, 2014 9:45 pm

Post by superwiiman » Thu Dec 11, 2014 2:59 am

Any advice at all?

Newbie

Posts

Joined
Mon Dec 08, 2014 9:45 pm

Post by screamingjungle » Thu Feb 11, 2016 8:21 pm

I'm also looking for an answer to this question. How to prevent Opencart redirecting the Openbay Ebay URL to HTTPS?

They've suggested switching off SSL for the frontend! Not worth the risks, but to switch it off for a single URL is better.

My htaccess is the standard file supplied with v2.1.0.2.

http://domain.com/index.php?route=ebay/openbay/testfile
redirects to
https://domain.com/index.php?route=ebay ... y/testfile

I couldn't find where the redirection occurs. Would be grateful if someone can point me to the code that does this.


-M.


Posts

Joined
Tue Apr 17, 2012 2:59 pm

Post by jrfcomputing » Thu Feb 11, 2016 8:54 pm

If you use Openbay pro for ebay you also need to add this code to .htaccess

Code: Select all

RewriteCond %{QUERY_STRING} !^route=ebay/openbay/*
under

Code: Select all

RewriteCond %{HTTPS} off
Before

Code: Select all

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Opencart sites I am currently working on:
http://www.cablecafe.co.uk
http://www.exclusivelygorgeous.co.uk/


User avatar
Active Member

Posts

Joined
Mon May 09, 2011 11:29 pm

Post by screamingjungle » Fri Feb 12, 2016 12:08 am

Thanks, but I think this could be an older OC version. htaccess does not have the https rewriterule (it's done in php).

I tried this:
RewriteCond %{HTTPS} on
RewriteCond %{QUERY_STRING} ^route=ebay/openbay/*
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

and I'm getting a redirect loop as htaccess and opencart and both redirecting.

I figure if I can find that header() then I can simply filter for ebay/openbay and skip it (or hardcode http://)


Posts

Joined
Tue Apr 17, 2012 2:59 pm

Post by eWarrior » Fri Feb 24, 2017 9:01 pm

Just thought I would add my solution in case it helps others (which it likely will).

If you have modified your config file to ensure all URL's are generated as HTTPS and also added a redirect rule within htaccess, then you will need to handle both of these factors.

First you will need to exclude OpenBay Pro URL's from being redirected to HTTPS in htaccess and then you will need to redirect any OpenBay Pro URL's back to HTTP (as a result of the config file generating all URL's as HTTPS).

My complete rule set below.

Code: Select all

# Redirect to HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{QUERY_STRING} !^route=ebay/openbay/*
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]

# Redirect OpenBay Pro URL's back to HTTP
RewriteCond %{HTTPS} on
RewriteCond %{QUERY_STRING} ^route=ebay/openbay/*
RewriteRule (.*) http://%{SERVER_NAME}/$1 [R=301,L]

New member

Posts

Joined
Wed Aug 29, 2012 4:27 pm
Who is online

Users browsing this forum: No registered users and 214 guests