What if you only set a redirection without any condition, but that expects that each subdomain has its own document_root?
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
Try this:
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301,QSA]
Place it on top of .htaccess.
If you have OLS instead of LSWS you must restart OLS to apply changes.
@LuigiMdg
Why don't you do what I suggested? It does exactly what you want to get!
https://www.litespeedtech.com/support/forum/threads/purge-cache-at-00-oclock.20713/post-119895
You have rewrite rules in your .htacess that come from other cache plugins and these rules affects queries in URL, so you have to clean and reset it to default .htaccess. Otherwise there is no way to find a solution. Use Wordpress default .htaccess and remove anything else. If done and if you...
@AndreyPopov
As long you don't respect people who have much experience and knowledge about curl and other LiteSpeed related stuff you will never really improve anything. Your current published code about how to improve crawling and caching is bullshit. You do a lot and if it works you don't...
Nonsense! If the client doesn't send any information about if he supports any compression how should the server know if he can compress traffic? Why are the cache files sizes are so big? Right, because server hasn't compressed it due unknown Accept parameter
HTTP/2 is only used by curl if...
If you have Wordpress then you will get support for Wordpress cache plugin at Wordpress plugin support. This forum no longer offers support for cache plugin.
https://wordpress.org/support/plugin/litespeed-cache/
I adviced you to set the new code "on Top" of .htaccess.
Where does the question mark come from? To solve your issue the best solution is to remove the reason why this question mark is set!
curl_setopt($ch, CURLOPT_ENCODING, "");
Means neither traffic will compressed nor the cache will be compressed and if there is no compression much more disk space is needed => a logical result. And a further result it is that LSWS or OLS creates compressed copies of the cache files next time...
Why do you publish data to access your server? Are you crazy?
Try this for your question. Not tested, but should work:
RewriteCond %{QUERY_STRING} (.*)\?(.*)$
RewriteRule ^(.*)$ $1\?%1%2 [R=301,L,NE]
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)$ $1%1...
Again, again and again. It is not possible to only check if a page is cached or not. Every check is a HTTP request and a request causes to cache a page! You can check it by your own. Purge cache of your homepage and run this curl command. If done check cache status:
curl -k -I -s -X GET -H...
If a page is already cached there are no more additional cache files in cache directory and most of the requested URL were already cached, so you argues with wrong arguments :) Furthermore the cached files are compressed and only HTML Output is cached and not static sources like images, css and...