-
-
Save cimadai/379145 to your computer and use it in GitHub Desktop.
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
# sinatra でのリダイレクト設定 | |
# http://.../hoge のような '/' なしを '/' ありへリダイレクト | |
# ただし、 http://example.com の場合は末尾 '/' が付く | |
get %r{^(.+[^/])$} do |c| | |
redirect c + "/", 303 | |
end |
Author
cimadai
commented
Apr 26, 2010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment