1

The fix in the duplicate question doesn't work.

I tried all the Fixes in stackoverflow but nothing seems to be working laravel trailing Slashes redirect to localhost

Route

Route::get('/admin', array('as' => 'admin', 'uses' => 'Admin\Admin@getLogin'));

This URL is working fine http://localhost/app/admin

but when I add a trailing slash in front of it http://localhost/app/admin/ it gets redirected to http://localhost/admin

Help!

Community
  • 1
  • 1
user3407278
  • 1,233
  • 5
  • 16
  • 32

2 Answers2

8

Added this and it worked!

RewriteCond %{REQUEST_URI} !^
user3407278
  • 1,233
  • 5
  • 16
  • 32
  • http://jsfiddle.net/5suvnwyL/1/ check this for http://stackoverflow.com/questions/32153332/how-to-disable-the-all-days-before-the-the-day-from-input-value-on-bootstrap-dat – Umesh Sehta Aug 22 '15 at 07:08
2

i too had this problem and mine need a combination of the above with suggestions from some other posts. Don't remember from which posts anyways this was my .htaccess that got me working correctly.
And 1 more thing our project did not have public in the url.

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    RewriteBase /PROJECT_NAME

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_URI} !^
    RewriteRule ^(.*)/$ $1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
Scrappy Cocco
  • 1,192
  • 3
  • 21
  • 38