Last active
May 28, 2019 13:25
-
-
Save renalpha/5327cfe8ab2297dfefef49f0898a2cef to your computer and use it in GitHub Desktop.
Laravel post api | Allow trailing slash post routes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Redirect Trailing Slashes If Not A Folder... | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_URI} (.+)/$ | |
| # Dont redirect on POST methods.... | |
| RewriteCond %{REQUEST_METHOD} !POST | |
| RewriteRule ^ %1 [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment