PHP redirect code (with correct header)
1 2 <?php 3 header ('HTTP/1.1 301 Moved Permanently'); 4 header('Location: http://domain.com/'); 5 exit; 6 ?>
13495 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 2 <?php 3 header ('HTTP/1.1 301 Moved Permanently'); 4 header('Location: http://domain.com/'); 5 exit; 6 ?>
1 2 headers["Status"] = "301 Moved Permanently" 3 redirect_to "http://www.newdomain.com"
1 2 head :moved_permanently, :location => book_url(@book)
1 2 # Examples: 3 # redirect_to post_url(@post), :status=>:found 4 # redirect_to :action=>'atom', :status=>:moved_permanently 5 # redirect_to post_url(@post), :status=>301 6 # redirect_to :action=>'atom', :status=>302