Skip to content

Instantly share code, notes, and snippets.

@boyvanamstel
Created July 19, 2011 21:39
Show Gist options
  • Save boyvanamstel/1093789 to your computer and use it in GitHub Desktop.
Save boyvanamstel/1093789 to your computer and use it in GitHub Desktop.
When posts and other http CRUD methods stop working in Rails
# You probably used the html5-boilerplate gem..
# Comment this part at line 348 and it'll start working again.
# Option 1:
# Rewrite "domain.com/foo -> domain.com/foo/"
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ /$1/ [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment