Litespeed htaccess issue

#1
I have done a lot of research, looked over a couple of hundred articles/forum posts but none fix my issues.

Litespeed is not reading the .htaccess files in the site directories. It only reads from the server level.

http://i.imgur.com/qaYCkjL.png

As you can see it should work according to the configuration on litespeed.
 

NiteWave

Administrator
#2
they are 2 types of virtual host:
1)vhost comes from apache's httpd.conf
2)vhost from lsws's web admin

if it's 1), please check first if .htaccess works under apache. if it works, it should work under litespeed.
 
#3
htaccess worked fine before the move to litespeed. I've even setup

<Directory "/home/name/public_html">
Options FollowSymLinks
AllowOverride All
</Directory>

Inside a vhost in apache. But this didn't work either.
 

mistwang

LiteSpeed Staff
#4
Please turn on debug logging, restart LSWS, access the site, check /usr/local/apache/logs/error_log if using cPanel, if not, check /usr/local/lsws/logs/error.log, it should have something about loading .htaccess, and process each directive in the log.
 
#5
Ok so I can see it can see the .htaccess file and it is updating it apparently. To litespeed's cache maybe?

However this site runs on codeigniter and moving from another apache server to this litespeed on it is not working as it should. Whenever clicking a URL it returns 404 when the old server returned the correct page.
 

mistwang

LiteSpeed Staff
#6
There could be rewrite rule compatibility issue.
What you can is to turn on rewrite log for that vhost, just add

RewriteLogLevel 9

to in <VirtualHost ...> </VirtualHost>

temporarily, restart server, then check rewrite related log entries in the error.log.
Post your rewrite rule may help identifying the problem.
 
#7
All that I could find was that the log was showing to GET the URL but I still returned a 404.

Here's what's in the .htaccess

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]




Now the site is under a subdirectory. I could only find that it was processing the root directories .htaccess. No mention of the sub directories.
 

mistwang

LiteSpeed Staff
#11
Are you using native LSWS configuration or still load vhosts from Apache configuration?

First, you need to make sure .htaccess was loaded in the debug logging.
Make sure .htaccess permission is set correctly so it can be read by server process, need to make it world readable.
try touch .htaccess see if server update it when next request comes in.
 
Top