Hi, I recently deployed a Laravel 11 in Hostinger using GIT. I'll be calling it "website.com". For some reason, Hostinger shared hosting only allows for GIT deployments inside /public_html/ folder, which is the document root, so I deployed in /public_html/website.com/ (folder name same as domain for convenience). As the document root cannot be changed, I created an .htaccess file inside public_html, to point requests to Laravel's public folder at /website.com/public/ . This works fine and the webiste is fully operative.
However, there's a weird issue where if I type in my browser "https://website.com/website.com/public", it also gets me to the home, and I can navigate the site from there too. For some reason, any url can be replicated in that subpath, for example: "https://website.com/media" can also be accessed as "https://website.com/website.com/public/media"
I don't know how to fix this and prevent this duplicity. Also, I'm concerned about security. Here is the .htaccess that I've put in /public_html/
# Redirect all requests to Laravel public folder
RewriteCond %{HTTP_HOST} ^(www.)?website.com$ [NC]
RewriteCond %{REQUEST_URI} !^/website.com/public/
RewriteRule ^(.*)$ /website.com/public/$1 [L]
There's also the Laravel 11 default .htaccess inside the public folder. I haven't modified or deleted it since I don't know what to do with it.
Any tips?