Edge_jr Posted August 16, 2022 Share Posted August 16, 2022 Hi, Any idea what code needs to be added in htaccess to increase the speed and optimization website? Link to comment Share on other sites More sharing options...
Zohaib-fk Posted August 16, 2022 Share Posted August 16, 2022 (edited) Hello Edge, Try adding below code in htaccess file Visit article link for more details => https://www.presta-addons-modules.com/en/blog/227_Prestashop-how-to-use--htaccess-to-speed-up-your-site.html <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent </IfModule> Edited August 24, 2022 by Zohaib-fk Post Updated (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted August 18, 2022 Share Posted August 18, 2022 Normally this is set for you when you enable apache optimization in ps admin performance page. Also ensure gzip is enabled using this site to verify. https://www.giftofspeed.com/gzip-test/ Link to comment Share on other sites More sharing options...
Edge_jr Posted August 23, 2022 Author Share Posted August 23, 2022 Thanks Zohaib and El Patron Link to comment Share on other sites More sharing options...
El Patron Posted August 24, 2022 Share Posted August 24, 2022 Performance Tip: Move Rewrite Rules from .htaccess to httpd.conf .htaccess can/does have significant impact to performance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now