So I've got this: Route::get('thread','ThreadController@index'); Route::get('thread/{id?}','ThreadController@show');
And its all set up and working so that if its: http://localhost/projects/laravel-test/public/thread/5 I get the thread.
However if I do not enter a parameter in the query, it simply redirects to: http://localhost/thread
and not: http://localhost/projects/laravel-test/public/thread
Why is that?
Thanks
Fixed. For any future users it was a problem with the htacess file Laravel ships with within the public folder.
Just needed to add: RewriteBase /projects/laravel-test/public RewriteRule ^(.*)/$ $1 [L,R=301]
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community