1. Zły dział.
2. Sposób .htaccess
RewriteEngine On
RewriteRule ^(.*)$ http://www.przyklad2.pl/$1 [R=301,L]
3. Sposób PHP
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.przyklad2.pl/");
?>
4. Sposób HTML
<meta http-equiv="refresh" content="0;url=http://www.przyklad2.pl/">
5. Sposób JS
<script type="text/javascript">
window.location.href='http://www.przyklad2.pl/';
</script>
6. Sposób ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.przyklad2.pl/"
%>
7. Sposób CGI
$przekierowanie = new CGI;
print $przekierowanie->redirect("http://www.przyklad2.pl/");
8. Sposób RUBY
def old_action
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.przyklad2.pl/"
end
9. Sposób JSP
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.przyklad2.pl/" );
response.setHeader( "Connection", "close" );
%>