Home IIS 10 trailing slash on Application
Reply: 0

IIS 10 trailing slash on Application

Sam_Benne
1#
Sam_Benne Published in 2017-12-05 10:12:58Z

I have currently got a view sites in sub folders of a site that have been converted to applications.

example.com/folder

When a user types a link with a slash at the end:

example.com/folder/foobar/

Then the redirect goes to the wrong place.

example.com/foobar instead of example.com/folder/foobar

I am using a Laravel and IIS 10 on Windows 10 and Windows Server 2012.

From the RouteServiceProvider:

Route::middleware('web')
        ->namespace($this->namespace . '\Admin')
        ->prefix('admin')
        ->group(base_path('routes/admin.php'));

In the routes:

Route::get('/', function() {
    die('here');
});

If example.com/folder/admin is hit then the text 'here' appears, if there is a slash at the end. Then you get redirected to example.com/admin.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.332933 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO