Laravel 5 - only home page route working on live server
i just found the main problem here.
all is working fine in my localhost, but on live server, ONLY the home page route is working.
like :
www.example.com/ is working all fine.
BUT
www.example.com/test is NOT working.
and its only on live server, while all routes are working fine on localhost.
can you please tell me what is the problem, is there anything to do with the .htaccess file while uploading the project online, or there is anything else that I am missing?
one more thing i noticed.
if I go to www.example.com/test is does not work
BUT
if i go to www.example.com/index.php/test , now it WORKS.
So, now I tell you the directory sturcture:
I have :
myWebsiteFolder/laravel/public_html
so, I have all the laravel files to "laravel" folder and the "public" contents to "public_html" folder.
my .htaccess file also lives in the "public_html" folder.
do I need to fix my .htaccess file, if yes, how?
do you understand what is happening, I have been searching for my answer for last two days but failed.
Hi guys, I need some help, I'm uploading a project in Laravel 5 to a server.
The main porblem is I just uploaded the project as localhost in public_html of my server, and I can access to my home page with www.domain.xxx/public, and I can't go any further, what should I change to just access to my home page using just the domain url?
for live server
www.mywebsite.com instead of mywebsite.com/public
you don't need anymore to write public
and also on to your links and script put public/
sample:
public/assets/site/css/lightbox.min.css
instead of:
assets/site/css/lightbox.min.css
I had a similar problem on my LAMP set-up. I fixed it by enabling rewrite functionality of apache. The details resolution is present (scroll to the bottom of the page) here if someone needs help on it
Ok after hours working on this I found that for me the issue was that I needed to add to apache2.conf file in /etc/apache2 :
<Directory /var/www/html/my-site/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Otherwise .htaccess will be ignored (without AllowOverride All).
After this modification, I could use the default .htaccess without any other issues, no need to edit anything.
Also, on 000-default.conf in etc/apache2/sites-enabled :