301 URL Redirect

301 redirect adalah sebuah metode untuk memindahkan halaman web ke halaman yang lain maupun ke domain lain. Kode “301” diartikan sebagai “dipindahkan secara permanen”.

ColdFusion Redirect
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”&gt;

PHP Redirect
<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com&#8221; );
?>

ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/&#8221;
%>

ASP .NET Redirect
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.new-url.com&#8221;);
}
</script>

JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/&#8221; );
response.setHeader( “Connection”, “close” );
%>

CGI PERL Redirect
$q = new CGI;
print $q->redirect(“http://www.new-url.com/&#8221;);

Ruby on Rails Redirect
def old_action
headers[“Status”] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/&#8221;
end

.htaccess redirect
redirect ke domain lain
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

redirect ke www
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]


Web Hosting Murah | Shared Hosting Murah | Registrasi Domain Murah

my tweet

Badge

blog-indonesia.com

instagram

Bercengkrama, 
#instafamily #instakids #instababy #instabanjar #mykeinara #myhanna #like4like #likeforlike Keinara intan & Hanna humaira Penyanyinya 3diva, 
Zufa, Hanna, Intan,

Bintang video klipnya Om Dana,

#lagubanjar #khasbanjar #amparamparpisang Full Team,.
Bersama 3orang anak,
1anak mertua + 2anak kandung.
#instafamily 
#mykeinara 
#myhanna

Menghadiri walimah perkawinan .
.
. .
.
#mykeinara
#holiday 
#manado 
#bunaken
#instamanado 
#indonesia 
#like4like

Blog Stats

  • 82,894 hits

%d bloggers like this: