Page 2 of 2

Re: what is the best file .htaccess for opencart

Posted: Mon Apr 27, 2020 9:28 pm
Well, my OC .htaccess meanwhile has a size of about 84KB, and it also contains
about 2135 Lines of IP-Range Denials, due to the enormous amount of daily hacking
attempts from all over the world. But after investing so much time into it, I decided, to
no longer share such knowledge with the Rest of the OC-World. It's just no worth it, to
longer publish such Code, because all the dark sheeps of the OC World would be able
to use it too, and there are masses of those around, the FB OC Sites are full of them. 8)
Sorry for the bad News, but I'm getting fed up with such crab .. ::)
PS. For the Pro's, it, at most, slows down GTMetrix Results by ~1 percentage point ...

Re: what is the best file .htaccess for opencart

Posted: Sun Aug 09, 2020 10:44 pm
by mattalt

Can you please post your last .htaccess?


Re: what is the best file .htaccess for opencart

Posted: Mon Aug 10, 2020 2:55 am
Well, I explained myself above already. Sorry about that ... ::)

And my 3'120 liner 104KB .htaccess file is (timewise) a 10k US-Dollar Investment ... :crazy: :laugh:
But it requires daily care and attention, to do it's Job in the upmost efficient way.
In addition, it also depends on the Server, since (real) Hosters make/have their own
Rules and Ideologies. One needs to test, and implement, what really works, when it
comes to .htaccess Filters and other things, placed in the right Sections of the file.

Or then, get one made by a Pro, best matching your Server. ;)


Re: what is the best file .htaccess for opencart

Posted: Fri Apr 09, 2021 2:36 am
by imager
Hi Ernie,

Could you post (or send) your latest .htaccess file?

One thing that caught my attention in the last posted version was the

Code: Select all

# Enable Gzip Compression
AddOutputFilterByType DEFLATE text/text
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
I was not aware that it needed to be called out specifically like this.

In my current .htaccess file, I have:

Code: Select all

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript
Is one better over the other or are they not related to each other in functionality?