I have hostinger shared hosting plan. working on laravel project. For a domain my current file structure is this :
Public_html/
Test/
Public/
.htaccess
Index.html
I want to redirect to public folder (https://example.com/test/public) without showing the "public" in the url and this is .htaccess code is
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
It’s showing me 404 error, how fix this?
<IfModule mod_rewrite.c>
RewriteEngine On
# Don't rewrite if the request is already for /public
RewriteCond %{REQUEST_URI} !^/Test/public/
# Don't rewrite if the file or directory exists
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other requests to public/
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
This is not even working , what should I do?