Hi, I am uploading a project using shared hosting (hostinger) and in a previous project I had it where I transferred the public folder into the public_html. After reading a post, a gentleman kindly says that its much better to have a .htaccess inside the public_html folder, pointing to the public/index.php (I think) in such as way as one can imagine like so. ../laravel/public/index.php.
The user describes using as such:
RewriteCond %{HTTP_HOST} ^your-domain.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.your-domain.com$
RewriteCond %{REQUEST_URI} !your-laravel-folder/public/
RewriteRule (.*) /your-laravel-folder/public/ [L]
But my confusion is how to implement this into the file that is already there, which I have moved from /laravel/public to /public_html
Here you can see how the file system is laid out.
└── school-tools.online
├── laravel
└── public_html
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
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]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>