Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tomaslanda1989@gmail.com's avatar

Is it safe to use .htaccess in shared hosting?

I depoyed laravel app from my github repository using ssh key into domains folder ,named public_html (I coudn't deploy in root folder ,because it's not allowed by hostinger). I added .htaccess file in public_html to redirect to public file. Is it safe or maybe there is a better option?

0 likes
1 reply
Snapey's avatar
Snapey
Best Answer
Level 122

better option is to delete the public_html folder and then create a symlink called public_html and point it to the laravel public folder.

Please or to participate in this conversation.