By default in Laravel if there is /
in the end of url it redirects you to link without /
in the end. Is it possible to disable this feature and allow /
in the end of url?
Asked
Active
Viewed 1,574 times
0

Kin
- 4,466
- 13
- 54
- 106
-
This may be asked already. . https://stackoverflow.com/questions/40991230/laravel-how-do-i-make-route-route-return-urls-with-trailing-slashes – hanish singla Aug 10 '17 at 11:55
-
I think you should follow this link (https://stackoverflow.com/questions/22063520/laravel-slash-after-url-redirects-to-root-folder) – AddWeb Solution Pvt Ltd Aug 10 '17 at 12:02
1 Answers
-2
edit .htaccess file in public folder
change this :
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1/ [L,R=301]
to :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R]

Salahshoor
- 1
- 1