Permanent redirect (301 redirect)
» Scris in categoria: Tutoriale SEO — SEO @ 17:24
Acest redirect se poate face in mai multe feluri, voi enumera cateva:
1. IIS Redirect
- In “Internet Services Manager” dati click dreapta pe fisierul, sau directorul pentru care doriti redirect
- Dati click pe butonul “a redirection to URL”
- Introduceti URL-ul catre care doriti redirectionarea
- Bifati “The exact URL entered above” si “A permanent redirection for this resource”
- Cam atat, acum dati click pe Apply.
2. ColdFusion Redirect
<.cfheader statuscode="301" statustext="Moved permanently"> <.cfheader name="Location" value="http://www.urlnou.com">
3. PHP Redirect
<?php Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.url-nou.com" ); ?>
4. ASP Redirect
<%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location","http://www.url-nou.com/" %>
5. 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.url-nou.com"); } </script>
6. JSP (Java) Redirect
<% response.setStatus(301); response.setHeader( "Location", "http://www.url-nou.com/" ); response.setHeader( "Connection", "close" ); %>
7. CGI PERL Redirect
$q = new CGI; print $q->redirect("http://www.urlnou.com/");
8. Ruby on Rails Redirect
def old_action headers["Status"] = "301 Moved Permanently" redirect_to "http://www.url-nou.com/" end
9. htaccess Redirect (domeniu vechi catre domeniu nou)
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.domeniu-nou.com/$1 [R=301,L]
!1 Acest cod se introduce intr-un fisier denumit .htaccess si care se pune in directorul root al site-ului (unde este si INDEX).
!2 Aceasta metoda functioneaza doar pe serverele Linux care au modulul Apache Mod-Rewrite pornit.
10. www Redirect (folosind .htaccess)
Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^seoieftin\.com$ RewriteRule ^.*$ http://www.seoieftin.com%{REQUEST_URI} [R=permanent,L]
Niciun comentariu »
Niciun comentariu până acum.
Feed RSS pentru acest articol. TrackBack URL