Post by ggrant3 » Tue May 28, 2024 6:22 am

OC v 3.0.3.9

I've been doing minor stylesheet file changes and decided to see how everything looks on my phone and all I get are large images and text links.

I just did a search and someone had the same exact issue a couple years ago and somebody replied "config and htaccess files". Do I need to do something specific with those to make the site responsive? Or is it supposed to be responsive right out of the box?

Or could I have messed up something with the css file changes I have been making, just messing around with colors and minor stuff, but is it possible I deleted something in the stylesheet file I should not have?

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by ADD Creative » Tue May 28, 2024 4:20 pm

Are you using the correct URL in regards to https/http and www/no www?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ggrant3 » Tue May 28, 2024 6:24 pm

Yes.

It's weird, on a tablet that is 15 years old, it displays fine. On my much newer Galaxy S22, it shows links and oversized images.

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by WaxedPerfection » Tue May 28, 2024 8:55 pm

pop the url and someone will take a look for you, im sure.

https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's


Active Member

Posts

Joined
Sun Mar 26, 2017 8:23 pm

Post by paulfeakins » Tue May 28, 2024 11:16 pm

ggrant3 wrote:
Tue May 28, 2024 6:22 am
Or could I have messed up something with the css file changes I have been making, just messing around with colors and minor stuff, but is it possible I deleted something in the stylesheet file I should not have?
Anything is possible but we can't magically tell you without seeing the site.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ggrant3 » Wed May 29, 2024 4:52 am

I fixed it.

I added the following to the root htaccess file to force all pages to be https and it's working perfectly now on mobile

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by JNeuhoff » Wed May 29, 2024 4:59 am

Well done, and thanks for sharing your solution with us.
Please add '[SOLVED]' to the beginning of the original form thread title.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by nonnedelectari » Wed May 29, 2024 7:52 am

ggrant3 wrote:
Wed May 29, 2024 4:52 am
I fixed it.

I added the following to the root htaccess file to force all pages to be https and it's working perfectly now on mobile

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
Never use %{HTTP_HOST} in redirects unless you check for validity first as the value is user defined and can hold external domain reference, i.e. your site can be used to DOS another. If you don't validate, set it to you domain specifically.

New member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by WaxedPerfection » Wed May 29, 2024 3:36 pm

ADD Creative wrote:
Tue May 28, 2024 4:20 pm
Are you using the correct URL in regards to https/http and www/no www?
ooooooowwww this guy is good!!! ^-^ ^-^ ^-^

https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's


Active Member

Posts

Joined
Sun Mar 26, 2017 8:23 pm

Post by ggrant3 » Wed May 29, 2024 11:45 pm

nonnedelectari wrote:
Wed May 29, 2024 7:52 am
ggrant3 wrote:
Wed May 29, 2024 4:52 am
I fixed it.

I added the following to the root htaccess file to force all pages to be https and it's working perfectly now on mobile

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
Never use %{HTTP_HOST} in redirects unless you check for validity first as the value is user defined and can hold external domain reference, i.e. your site can be used to DOS another. If you don't validate, set it to you domain specifically.
TBH, I'm not knowledgeable enough to fully understand what you mean. I get the fact that someone can somehow use my domain to DOS someone else because of the code, but:
1. How do I check for validity first (and what does that mean)?
2. And/or How do I set it to my specific domain?

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by ADD Creative » Thu May 30, 2024 3:04 am

Depending on how your hosting is set up it could already be validated.

If you are only hosting one domain you could replace %{HTTP_HOST} with your domain. Although that won't be compatible with HSTS preload if redirecting www or non-www.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ggrant3 » Thu May 30, 2024 7:09 pm

ADD Creative wrote:
Thu May 30, 2024 3:04 am
Depending on how your hosting is set up it could already be validated.

If you are only hosting one domain you could replace %{HTTP_HOST} with your domain. Although that won't be compatible with HSTS preload if redirecting www or non-www.
I'm hosting this site under another site's main hosting account. using a subfolder under the main domain.

New member

Posts

Joined
Fri May 02, 2014 10:52 pm

Post by ADD Creative » Fri May 31, 2024 1:10 am

That might restrict the domain, but it might still be possible to redirect using the subdirectory of the main site.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: Majestic-12 [Bot], Semrush [Bot] and 22 guests