I have build and application using Laravel. On localhost everything works fine.
My home page route is
Route::get('/', 'HomeController@index');
On locahost when I load https://localhost/app/public it redirects autmatically to https://localhost/app/public/ and everything works. On local I am using XAMP.
When i made my application live I used lightpd. I found that all urls except home/root not loading.
I have updated lighttpd.conf file like this
url.rewrite-if-not-file += (
"^/[^\?]*(\?.*)?$" => "index.php/$1"
)
and
url.rewrite-once = (
"^/(css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf)$" => "$0",
"^/(favicon\.ico|robots\.txt|sitemap\.xml)$" => "$0",
"^/[^\?]*(\?.*)?$" => "index.php/$1"
)
in these two cases all others urls working.
The issue is home URL without trailing slash giving 404. It is not giving 404 if I don't add the redirect rule as the url automatically redirects to a url with slash. The automatic redirection of home url to url with slash is not occurring after I add the rule.
all my home urls like url('/') giving 404.
I hope I described the issue well. Is there any solution to it?