I configure the routing
But on the page.
I want the link form is http://m.xxx.com/gushi/back with "/" ask you the big God is not what configuration?
Reply content:
I configure the routing
But on the page.
I want the link form is http://m.xxx.com/gushi/back with "/" ask you the big God is not what configuration?
This is not purely a framework or routing problem, in the URL/is a specific meaning, so you can not set the/as a delimiter.
And in fact, for the Web server/category/and/category is the same address, you are superfluous.
Moreover, the first thing in routing parsing is to split the request URL according to '/', so you will not get the desired result by artificially adding/in the URL. It is like a file name is not used/because it causes the system to confuse the path.
If you really want to implement the back forward slash, in Apache. htaccess
#RewriteCond %{REQUEST_FILENAME} !-d#RewriteRule ^(.*)/$ /$1 [L,R=301]
Comment out, and then route this write
Route::get('/hero/',['uses'=>'Mobile\HerosController@category','as'=>'m_heroCategory']);
You can get a route like http://www.test.com/hero/.
Reference link Http://stackoverflow.com/questions/22063520/laravel-slash-after-url-redirects-to-root-folder