Getting Roots to work with Litespeed
Trying to get Roots to work with Litespeed. Downloaded and activated 5.1.0 and selected "yes" to all the options but still see all references to /wp-content/plugins/, /wp-content/themes/and /wp-includes in the source code. is there something specific to Litespeed I need to be doing?
Thx.
people have had success on two alternative setups so far: Nginx and Lighttpd
is there a way to run .htaccess rules in litespeed? you'd need to edit first if statement in roots-htaccess.php
I'm not a systems person but Apache's .htaccess rules normally work fine in Litespeed. This is what is currently in my .htaccess:
# Block the include-only files.
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
this is a normal roots .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^css/(.*) /wp-content/themes/roots/css/$1 [QSA,L]
RewriteRule ^js/(.*) /wp-content/themes/roots/js/$1 [QSA,L]
RewriteRule ^img/(.*) /wp-content/themes/roots/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I have just installed Roots on my Litespeed server and the .htaccess rules work as intended after amending the roots-htaccess.php IF statement. Simply change Line 7 to:
if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') || stristr($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false) {
This will work on both Apache and Litespeed.
thx @Foxaii