尾随斜线网址被重定向在laravel 5到本地主机 [英] URL with trailing slashes gets redirected to localhost in laravel 5
本文介绍了尾随斜线网址被重定向在laravel 5到本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在重复的问题,该修补程序不起作用。
The fix in the duplicate question doesn't work.
我尝试了所有的修复程序计算器,但似乎没有奏效 <一href="http://stackoverflow.com/questions/21735527/laravel-trailing-slashes-redirect-to-localhost">laravel尾随斜线重定向到本地主机
I tried all the Fixes in stackoverflow but nothing seems to be working laravel trailing Slashes redirect to localhost
路线
Route::get('/admin', array('as' => 'admin', 'uses' => 'Admin\Admin@getLogin'));
这个URL工作正常 的http://本地主机/应用程序/管理
This URL is working fine http://localhost/app/admin
但是当我在它前面加斜线的http://本地主机/应用程序/管理/ 它被重定向到的http://本地主机/管理
but when I add a trailing slash in front of it http://localhost/app/admin/ it gets redirected to http://localhost/admin
帮助!
推荐答案
补充这一点,它的工作!
Added this and it worked!
RewriteCond %{REQUEST_URI} !^
这篇关于尾随斜线网址被重定向在laravel 5到本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文