nginxでrewrite
server {
listen 80;
server_name hoge.com hoge.org;
if ($http_host = hoge.com) {
rewrite (.*)$ http://hoge.org$1;
}
location / {
# hoge.org のサーバー設定
}
}
てきな
server {
listen 80;
server_name hoge.com hoge.org;
if ($http_host = hoge.com) {
rewrite (.*)$ http://hoge.org$1;
}
location / {
# hoge.org のサーバー設定
}
}
てきな
Railsのconfig/routes.rbを書くときの注意点
member do
match '/:route' => 'users#show'
end
resources :watchlists, only: :index
とすると、/users/:id/watchlists にいったときにusers_controllerにいってしまう。
あとでよむ
It’s now super easy to add a “Share on Tumblr” button to any site.
Adding the basic Tumblr Button couldn’t be simpler. Just cut and paste the code and you’ll be off running. But the advanced options are where it gets interesting…
The Tumblr Button can give you complete control over how your content appears when shared on Tumblr. Not only does this mean specifying an excerpt or summary, but also deciding whether it appears as a Link, Quote, Photo, or Video Embed.
Even better: This can be deeply integrated with just about any publishing platform to add contextual buttons next to things like paragraphs or photos. Check out these examples.
The appearance of the button is also completely customizable.
core javascript guides
Ruby on Rails CSRF protection Guides