Heloo , i would like to express the stress we have had over the past 2 months. Our website is hosted with a cpanel which has lite speed, but our website script has no plugin for litespeed so for many these days, we have been testing by implementing a code via the .htaccess, which some of the codes worked showing greater improvement on speed, but everytime we were challenged by users unable to login or logout and our website hosts keep telling us, ''go out there and search for a code that fits you'' it has been real stress, luckily i for this forum where i could ask someone for help.
Our site: https://sopriza.com
is structured like this image below, where in public_html/assest we keep, images , js , js? , css, css?
and in public_html/vendor we keep installations of plugins which are extensions.
These two folders are only ones important.
Our .htaccess has mod_rewrite
So, when we try LS cache using
we dont have any folder /news
RewriteCond %{ORG_REQ_URI} !/news
RewriteCond %{ORG_REQ_URI} !/admincp
It works but users cant login. If someone, if anyone can help today, big thanks!
Our site: https://sopriza.com
is structured like this image below, where in public_html/assest we keep, images , js , js? , css, css?
and in public_html/vendor we keep installations of plugins which are extensions.
These two folders are only ones important.
Our .htaccess has mod_rewrite
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
# Ensure the Authorization HTTP header is available to PHP
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Uncomment the following lines if you are not using a `public` directory
# to prevent sensitive resources from being exposed.
# Uncommented by Pockethold - 3rdparty flarum installer.
RewriteRule /\.git / [F,L]
RewriteRule ^composer\.(lock|json)$ / [F,L]
RewriteRule ^config.php$ / [F,L]
# Pass requests that don't refer directly to files in the filesystem to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
</IfModule>
Code:
<IfModule LiteSpeed>
RewriteEngine On
CacheEnable public /
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|BlackBerry|Palm|Mobile|Opera Mini|Fennec|Windows Phone"
RewriteRule .* - [E=Cache-Control:vary=ismobile]
RewriteCond %{REQUEST_METHOD} ^HEAD|PURGE|GET$
RewriteCond %{ORG_REQ_URI} !/news
RewriteCond %{ORG_REQ_URI} !/admincp
RewriteRule .* - [E=Cache-Control:max-age=120]
</IfModule>
RewriteCond %{ORG_REQ_URI} !/news
RewriteCond %{ORG_REQ_URI} !/admincp
It works but users cant login. If someone, if anyone can help today, big thanks!
Last edited: