Post by acres0786 » Fri Jun 23, 2017 1:37 am

I have installed OC v2.3 on subdomain with wildcard ssl. The main domain is a wordpress site hosted in bluehost. I have modified both the configs to support ssl and set "Use SSL?" to "Yes" in the admin side. All works fine but checkout is broken. After inputting the billing details and clicking continue, a popup appears that shows the code of the main domain (wordpress).

This is my htaccess:

BlueHost.com
#.htaccess WildCard SSL
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteRule ^(/)?$ subdomain/index.php [L]

# Custom maindomain .htaccess WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# End custom maindomain .htaccess

Is there something wrong with my htaccess?

Newbie

Posts

Joined
Fri Jun 23, 2017 1:21 am

Post by IP_CAM » Fri Jun 23, 2017 2:51 am

well, probably this one:
RewriteBase /
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by acres0786 » Fri Jun 23, 2017 7:12 am

IP_CAM wrote:
Fri Jun 23, 2017 2:51 am
well, probably this one:
RewriteBase /
Ernie
Hello. I removed RewriteBase /
but still the same problem.

Newbie

Posts

Joined
Fri Jun 23, 2017 1:21 am

Post by IP_CAM » Fri Jun 23, 2017 7:30 am

well, I did NOT say, to remove the RewriteBase / , in contrary,
it has to be there, but completed, to match the subdirectory, where
the Shop Software is placed, like by example:
RewriteBase / yourshopsub/
But better be aware, that a WILDCARD SSL will probably not work anyway!
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by acres0786 » Fri Jun 23, 2017 7:44 am

IP_CAM wrote:
Fri Jun 23, 2017 7:30 am
well, I did NOT say, to remove the RewriteBase / , in contrary,
it has to be there, but completed, to match the subdirectory, where
the Shop Software is placed, like by example:
RewriteBase / yourshopsub/
But better be aware, that a WILDCARD SSL will probably not work anyway!
Ernie
i replaced it with the subdirectory but still the same problem. why wildcard ssl will not work?

Newbie

Posts

Joined
Fri Jun 23, 2017 1:21 am

Post by IP_CAM » Fri Jun 23, 2017 7:53 am

well, your problem is, that you probably try to COMBINE your htaccess file,
to match OC and Wordpress, and I assume, that such will not function anyway.
But I am NOT fluent with SSL Certificates, I only recall others, trying to use them,
and usually, it never worked.
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sculptex » Sun Jun 25, 2017 7:49 am

acres0786 wrote:
Fri Jun 23, 2017 1:37 am
I have installed OC v2.3 on subdomain with wildcard ssl. The main domain is a wordpress site hosted in bluehost. I have modified both the configs to support ssl and set "Use SSL?" to "Yes" in the admin side. All works fine but checkout is broken. After inputting the billing details and clicking continue, a popup appears that shows the code of the main domain (wordpress).

This is my htaccess:

BlueHost.com
#.htaccess WildCard SSL
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteRule ^(/)?$ subdomain/index.php [L]

# Custom maindomain .htaccess WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# End custom maindomain .htaccess

Is there something wrong with my htaccess?
(Assuming typical /home/username/public_html for primary instance of maindomain)
Depends, what server folder does sudomain point to?

if its /home/username/subdomain then you don't need all that but you do need other stuff for oc. you can get rid of instances of subdomain/ as subdomain.maindomain.com is treated like a whole domain in its own right.
if you've got it pointing to /home/username/public_html/subdomain then you have a problem because subfolders inherit htaccess settings from parent so you are always gonna have problems.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by acres0786 » Sun Jun 25, 2017 9:34 am

sculptex wrote:
Sun Jun 25, 2017 7:49 am
acres0786 wrote:
Fri Jun 23, 2017 1:37 am
I have installed OC v2.3 on subdomain with wildcard ssl. The main domain is a wordpress site hosted in bluehost. I have modified both the configs to support ssl and set "Use SSL?" to "Yes" in the admin side. All works fine but checkout is broken. After inputting the billing details and clicking continue, a popup appears that shows the code of the main domain (wordpress).

This is my htaccess:

BlueHost.com
#.htaccess WildCard SSL
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteRule ^(/)?$ subdomain/index.php [L]

# Custom maindomain .htaccess WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_HOST} ^(www.)?maindomain.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# End custom maindomain .htaccess

Is there something wrong with my htaccess?
(Assuming typical /home/username/public_html for primary instance of maindomain)
Depends, what server folder does sudomain point to?

if its /home/username/subdomain then you don't need all that but you do need other stuff for oc. you can get rid of instances of subdomain/ as subdomain.maindomain.com is treated like a whole domain in its own right.
if you've got it pointing to /home/username/public_html/subdomain then you have a problem because subfolders inherit htaccess settings from parent so you are always gonna have problems.
I resolved this by forcing all OC pages to SSL and modifying my htaccess to only this:

#.htaccess WildCard SSL
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteRule ^(.*)$ /subdomain/$1
RewriteCond %{HTTP_HOST} ^subdomain.maindomain.com$
RewriteRule ^(/)?$ subdomain/index.php [L]

OC is working perfectly so far.

Thanks all

Newbie

Posts

Joined
Fri Jun 23, 2017 1:21 am
Who is online

Users browsing this forum: No registered users and 30 guests