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


RewriteEngine On

# Remove trailing slash from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]