i need to upload laravel project on sub folder in subdomain because there will be wordpress website,
while i am searching i found that i can use .htaccess, is there another way ? because i am new to laravel and no experience in [tag:.htaccess ]
— subdmoain.com
— public_html
— subfolder
—laravel project
i tried using changing App_Url
2
Answers
.htaccess is of course the best way. But if you don’t know how to do that, I think you can create a subdomain from your hosting provider (like hostinger, etc), and after that, you can upload it to that folder (the one with the subdomain). Ask the hosting provider contact person, they will gladly help you to set up the subdomain
Just upload your Laravel files to
/public_html/subdomain/
Then create a new file called
.htaccess
(yes, in the same subdomain folder) and then insert this code so it would start loading index.php from/public_html/subdomain/public/
folder which exists in Laravel App:Save it. When you visit your subdomain URL now, the app should work.
If it throws any errors, then most likely your index.php paths aren’t correct or you do not have
vendor/
folder.