Rewrite Rules

#1
Are the rewrite rules correct?
We are running wordpress.
Before LS cache we were using wp-rocket and varnish.
Currently using LS cache with varnish.


Code:
<IfModule LiteSpeed>
RewriteEngine on
###LSCACHE START MOBILE VIEW###
RewriteCond %{HTTP_USER_AGENT} 2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800|w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda- [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
###LSCACHE END MOBILE VIEW###
###LSCACHE START COOKIE###
RewriteCond %{HTTP_COOKIE} wordpress_logged_in_
RewriteRule .* - [E=Cache-Control:no-cache]
###LSCACHE END COOKIE###

</IfModule>

# BEGIN iThemes Security - Do not modify or remove this line
# iThemes Security Config Details: 2
    # Enable the hide backend feature - Security > Settings > Hide Login Area > Hide Backend
    RewriteRule ^(/)?v-admin/?$ /wp-login.php [QSA,L]
    # Protect System Files - Security > Settings > System Tweaks > System Files
    <files .htaccess>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    <files readme.html>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    <files readme.txt>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    <files install.php>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    <files wp-config.php>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    # Disable XML-RPC - Security > Settings > WordPress Tweaks > XML-RPC
    <files xmlrpc.php>
        <IfModule mod_litespeed.c>
            Order allow,deny
            Deny from all
        </IfModule>
    </files>
    # Disable Directory Browsing - Security > Settings > System Tweaks > Directory Browsing
    Options -Indexes
    <IfModule mod_rewrite.c>
        RewriteEngine On
        # Protect System Files - Security > Settings > System Tweaks > System Files
        RewriteRule ^wp-admin/includes/ - [F]
        RewriteRule !^wp-includes/ - [S=3]
        RewriteCond %{SCRIPT_FILENAME} !^(.*)wp-includes/ms-files.php
        RewriteRule ^wp-includes/[^/]+\.php$ - [F]
        RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F]
        RewriteRule ^wp-includes/theme-compat/ - [F]
        # Disable PHP in Uploads - Security > Settings > System Tweaks > Uploads
        RewriteRule ^wp\-content/uploads/.*\.(?:php[1-6]?|pht|phtml?)$ - [NC,F]
    </IfModule>
# END iThemes Security - Do not modify or remove this line
<IfModule mod_rewrite.c>
RewriteEngine on
#
# Unless you have set a different RewriteBase preceding this
# point, you may delete or comment-out the following
# RewriteBase directive:
#RewriteBase /
#
# if request is for image, css, or js file
RewriteRule \.(gif|jpe?g|png|css|js|ico)$ - [L,NC]
# or if URL resolves to existing file
RewriteCond %{REQUEST_FILENAME} -f [OR]
# or if URL resolves to existing directory
RewriteCond %{REQUEST_FILENAME} -d
# then skip the rewrite to WP
RewriteRule ^ - [S=1]
# else rewrite the request to WP
RewriteRule . /index.php [L]
</IfModule>
 
#3
Thankyou.
One more thing:

I notice that litespeed hangs sometimes.
Btw currently ive switched to LScache and using only cloudflare.
I think that happens when the front page cache has been cleared.
Sometimes i have to press a link 2 or 3 times.
And as our website is a news website the front page cache will be cleared quite frequently.
Using: Litespeed Web Server Enterprise 5.0.16
 
L

Long

Guest
#4
Can you provide the url links? How long did you wait before you click the link again?
If without cache how long will the dynamic page generation take?
 
Top