Post by Miguel07 » Thu Feb 04, 2021 3:51 pm

Hi guys,

I was wondering if someone could help me. Yesterday I was trying to get my SEO URL function to work and I ran across a thread that gave me code that I had to put into my .htaccess file in order for it to work. Since then, I have tried to make changes to the products in the back end of my website and I keep receiving the same error in my browser: ERR_CONNECTION_RESET. I have never received this error prior to making this change and I have tested it on numerous devices and browsers. The problem persists. I am not sure if I put the code incorrectly or if there is something else I perhaps could have done wrong.

My site URL is www.bitwaretech.co.za and it is on OC version 3.0.3.2

The code in my .htaccess file looks like this:

Code: Select all

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

RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by Miguel07 » Thu Feb 04, 2021 4:18 pm

Edit: I am also receiving a ERR_EMPTY_RESPONSE error when trying to change settings in my admin panel

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by sw!tch » Thu Feb 04, 2021 4:28 pm

Sounds more like a host issue or local DNS, ISP issue. Are you using a proxy or something?

If you remove the .htaccess changes you made are you able to replicate?

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by Miguel07 » Thu Feb 04, 2021 4:36 pm

Hi switch,

I am not using a proxy. I have taken the changes back and it seems to be working ok now. I am able to edit products and make changes to products although now the SEO URL function is also not working.

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by sw!tch » Thu Feb 04, 2021 5:16 pm

I think the problem is you have your config domain prefix setup with www., but your https check is trying to forward you to non-www. Also looks like you are running a really old version of PHP (PHP/5.6.40) .

You may have to play around with .htaccess especially if you are on an older version of apache it can vary a bit.

Assuming your config is setup with www.domain.com, you would want www + https.

See here -
viewtopic.php?t=183503#p671667
https://stackoverflow.com/a/13997498

Post your .htacess if you still have issues.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by paulfeakins » Thu Feb 04, 2021 5:50 pm

Miguel07 wrote:
Thu Feb 04, 2021 3:51 pm
I ran across a thread that gave me code that I had to put into my .htaccess file in order for it to work.
No changes to .htaccess are required for SEO URLs to work other than it must be renamed from .txt.

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 Miguel07 » Thu Feb 04, 2021 6:20 pm

paulfeakins wrote:
Thu Feb 04, 2021 5:50 pm
Miguel07 wrote:
Thu Feb 04, 2021 3:51 pm
I ran across a thread that gave me code that I had to put into my .htaccess file in order for it to work.
No changes to .htaccess are required for SEO URLs to work other than it must be renamed from .txt.
That was done as per instruction on OC tutorial but it did not display the SEO URL in the search bar as intended.

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by mikeinterserv » Thu Feb 04, 2021 7:12 pm

Your RewriteBase is in the wrong place put it on line after RewriteEngine on
Try replacing this
put your domain name in place of domain name and .com or .co.uk or whatever

Code: Select all

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

Code: Select all

RewriteCond %{HTTP_HOST} !^yourdomain\.com$       [NC]
RewriteRule ^(.*)$  https://yourdomain.com/$1 [R=301,L] 
This assumes non www if you have www then the last line

Code: Select all

RewriteRule ^(.*)$  https://www.yourdomain.com/$1 [R=301,L]
Put this is your www/htdocs htaccess - if opencart is the root folder add it to htacess as the first line after RewriteBase. If opencart is in a sub directory add this to htaccess in the root www or htdocs directory

Post your complete htaccess file.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by mikeinterserv » Thu Feb 04, 2021 8:04 pm

Try this htaccess file

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^bitwaretech.co.za\.co.za$       [NC]
RewriteRule ^(.*)$       https://www.bitwaretech.co.za/$1 [R=301,L]

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Miguel07 » Fri Feb 05, 2021 4:07 pm

mikeinterserv wrote:
Thu Feb 04, 2021 8:04 pm
Try this htaccess file

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^bitwaretech.co.za\.co.za$       [NC]
RewriteRule ^(.*)$       https://www.bitwaretech.co.za/$1 [R=301,L]

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Hi Mike,

Thank you for trying to assist.

I pasted the code you provided in your second post and my website wouldn't load in, saying too many redirects. After that, I tried step for step what you said in your first post and I still got the same ERR_TOO_MANY_REDIRECTS browser message.

This is the complete contents of my htaccess file at the moment:

Code: Select all

AddHandler application/x-httpd-php54 .php
RewriteEngine On

RewriteBase /

RewriteCond %{HTTPS} !^bitwaretech.co.za$       [NC]
RewriteRule ^(.*)$ https://bitwaretech.co.za/$1 [R=301,L] 

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by xxvirusxx » Fri Feb 05, 2021 4:09 pm

Why you use php 5.4?

For redirect check here
viewtopic.php?t=183503

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by paulfeakins » Fri Feb 05, 2021 6:51 pm

Miguel07 wrote:
Thu Feb 04, 2021 6:20 pm
paulfeakins wrote:
Thu Feb 04, 2021 5:50 pm
Miguel07 wrote:
Thu Feb 04, 2021 3:51 pm
I ran across a thread that gave me code that I had to put into my .htaccess file in order for it to work.
No changes to .htaccess are required for SEO URLs to work other than it must be renamed from .txt.
That was done as per instruction on OC tutorial but it did not display the SEO URL in the search bar as intended.
Then your problem is something else but you shouldn't be modifying .htaccess.

It could be you haven't turned on SEO URLs in the admin.

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 khnaz35 » Fri Feb 05, 2021 8:01 pm

Check if you have turn on the SEO url from the admin setting.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by Miguel07 » Fri Feb 05, 2021 8:19 pm

SEO has been turned on. It was the first thing that I did and that was the how I noticed it was not working.

Would anybody be that knows what they're doing be willing to fix this issue for me for a fee?

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by khnaz35 » Fri Feb 05, 2021 8:25 pm

Miguel07 wrote:
Fri Feb 05, 2021 8:19 pm
SEO has been turned on. It was the first thing that I did and that was the how I noticed it was not working.

Would anybody be that knows what they're doing be willing to fix this issue for me for a fee?
Have you assigned SEO URL also for your product/Category etc Page?

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by Miguel07 » Fri Feb 05, 2021 8:27 pm

khnaz35 wrote:
Fri Feb 05, 2021 8:25 pm
Miguel07 wrote:
Fri Feb 05, 2021 8:19 pm
SEO has been turned on. It was the first thing that I did and that was the how I noticed it was not working.

Would anybody be that knows what they're doing be willing to fix this issue for me for a fee?
Have you assigned SEO URL also for your product/Category etc Page?
Not on all of them yet but I did for a select few so far to test and it does not work without the edit in the .htaccess.

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by khnaz35 » Fri Feb 05, 2021 8:36 pm

Miguel07 wrote:
Fri Feb 05, 2021 8:27 pm
Not on all of them yet but I did for a select few so far to test and it does not work without the edit in the .htaccess.
Share your .htaccess file here.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by khnaz35 » Fri Feb 05, 2021 8:41 pm

Try this code in your .htaccess

Code: Select all


# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by Miguel07 » Fri Feb 05, 2021 8:46 pm

khnaz35 wrote:
Fri Feb 05, 2021 8:36 pm
Miguel07 wrote:
Fri Feb 05, 2021 8:27 pm
Not on all of them yet but I did for a select few so far to test and it does not work without the edit in the .htaccess.
Share your .htaccess file here.
I added the .txt back to the file otherwise I could not add it here. The file in my website does not have the .txt extension.

Newbie

Posts

Joined
Tue Oct 20, 2020 6:08 pm

Post by khnaz35 » Fri Feb 05, 2021 8:54 pm

Try this htaccess.txt
upload to your website and rename it to .htaccess and let see if this works for you.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: adycobra2003, kirkhall, Majestic-12 [Bot] and 364 guests