Shahidhsalarzai's avatar

deploy laravel project to sub domain in hostinger

i have develop a project for my clint on xampp now i want to upload it for tisting purposes and showing it to my clint so he could see his project. i upload it to subdomain.example.com and i moved index.php and htaccess folder from public to root and chage path $app = require_once DIR.'/bootstrap/app.php';

its not lodding my bootstrap , images and js files what is the solution for it

0 likes
6 replies
Muetze's avatar

Why did you move the files? The file structure does't change between local and production. The root folder should not be accessible from the Internet at all. For safety reasons alone, this is wrong.

The domain or subdomain must mapped to the /public folder.

Shahidhsalarzai's avatar

@Muetze have folder name subdomain in which i have pasted my project files but it does not workng then i copy all files from public to subdomain folder it works for me but some functionolity not working

Muetze's avatar

@Shahidhsalarzai The files in the public folder remain in the public folder. You need to point your domain to the public folder.

Muetze's avatar
Muetze
Best Answer
Level 37

@Shahidhsalarzai

Be sure to keep Laravel's file structure! And always let the domain or subdomain point to the /public folder of your app.

Please or to participate in this conversation.