301 Redirect Code Generator
Use permanent 301 redirect to preserve search engines rank.
The code generator supports web pages redirection of html, php, asp, aspx files and .htaccess redirect.
Redirect geneartor
';
}
else if( type == 3 ) // .htaccess
{
txt = '# Permanent URL redirect - generated by www.rapidtables.com\n';
//txt += 'RewriteEngine On';
txt += 'Redirect 301 ';
url = src;
i = url.indexOf("//");
if(i>0)
url = url.substring(i+2);
i = url.indexOf("/");
if(i>=0)
url = url.substring(i);
else
url = '/';
if( url.indexOf(' ')!=-1 )
url = '\u0022'+url+'\u0022';
if( dest.indexOf(' ')!=-1 )
dest = '\u0022'+dest+'\u0022';
txt+= url;
txt+= ' ';
txt+= dest;
txt+= '\n';
}
else if( type == 4 ) // html meta tag
{
txt = '\n\n\n';
txt+= '\n';
txt+= '\n\n\n\n';
}
else
{
txt = '\n\n\n