Laravel .htaccess not working - 404 Page not found


  • Admin can save the rule, but the user not

I create subdomain (ex. with path “”, so i can install laravel in directory

When I’m go to it shown 404 page not found. I think there is something wrong with the htaccess file, so I check it in subdomain launcher → rewrite rule, but there is not, so I save it again and shown an error.

“Could not save rewrite rules. Error message: Websites matching query does not exist.”

Here is the .htaccess file

Options -MultiViews -Indexes
RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Hello @aris!

This could be a minor bug, a patch will be released along with next update. If you have created child-domain exactly to the path of your Laravel installation, you can open File manager save your .htaccess file from there and then restart OpenLiteSpeed.

Dear ones, reopening this discussion, I try to access my Laravel project and I get error 404, I re-recorded the htaccess rules. But it does not work

You should atleast provide more details as the original topic poster did with all the error details and the htaccess details. Your incomplete details cannot help us help you.