已编辑htaccess以删除尾部斜杠但仍然无法正常工作

I added a code to remove trailing slash at the end of my URL, cleared cache in the browser but still does'nt work. I'm using laravel.

Here is my code

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [R=301,L]

As you are using a local PHP server, you cannot use a .htaccess file. These files are used by Apache and are not read by PHP.

Try running your application on an Apache Server to test your .htaccess rules.