Apache的.htaccess工作正常,404与Litespeed

我使用共享主机上的litespeed(不幸),我正在尝试使用.htaccess将http重写为https NON www,并且将domain.com/index目的将domain.com/my-string更改为domain.com/my-string

这在Apache中工作正常,我不知道我的共享主机正在使用Litespeed。 我使用相同的.htaccess litespeed结果在404,尽pipe我的文件名是正确的。

这是我的htaccess:

 DirectoryIndex my-string.php Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^$ my-string [L] RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteRule ^my-string$ /my-string.php [L] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php56” package as the default “PHP” programming language. <IfModule mime_module> AddType application/x-httpd-ea-php56 .php .php5 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit 

底部是我的主机添加的。

这是在Apache中正常工作,执行301redirect从http非www或http www到https非www与我的string在URL的末尾,而不是索引。

我的理解是litespeed使用与Apache相同的语法,那么为什么会发生这种情况呢?