PHPでredirect 301 (permanent)する方法。
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.jp/");
?>
perlでredirect 301 (permanent)する方法。
#!/usr/bin/perl
use strict;
use warnings;
my $redirect_location = "http://www.example.jp/";
print <<_EOF;
Status: 301 Moved Permanently
Location: $redirect_location
Content-Type: text/html
_EOF
rubyでredirect 301 (permanent)する方法。
#!/usr/local/bin/ruby
redirect_location = "http://www.example.jp/"
puts <<_EOF
Status: 301 Moved Permanently
Location: #{redirect_location}
Content-Type: text/html
_EOF