.htaccess not working

#1
Hello, I'm new to the forum I have a problem with this .htaccess.

It works well in Apache, now I have litespeed and there is an error in these arguments, someone could help to fix this .htaccess.
I have error 404 in this redirect.

--------------------------------
ErrorDocument 404 /redirect


RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php


RewriteRule ^([0-9a-zA-Z-]+)$ ./redirect?link_id=$1
---------------------------------
 
Top