'; } else if( type == 3 ) // .htaccess { txt = '# Permanent URL redirect - generated by www.rapidtables.com\n'; txt += 'Redirect 301 '; url = T1.value; i = url.indexOf("//"); if(i>0) url = url.substring(i+2); i = url.indexOf("/"); if(i>=0) url = url.substring(i); else url = '/'; txt+= url; txt+= ' '; txt+= T2.value; txt+= '\n'; } //else if( type == 4 ) // html canonical link tag //{ // txt = '\n\n'; // txt+= '\n'; // txt+= '\n\n\n\n'; //} else // html meta tag { txt = '\n\n'; txt+= '\n'; txt+= '\n\n\n\n'; } document.getElementById('TA1').value = txt; } function ResetButton() { T1.style.color = "#aaa"; T2.style.color = "#aaa"; } function ResetText(obj, op) { if( op==0 ) // onclick { if( (obj==T1 && obj.value==old_url)||(obj==T2 && obj.value == new_url) ) { obj.value = ""; obj.style.color = "#000"; } } else // onblur { if( obj.value == "" ) { if( obj==T1 ) obj.value = old_url; else obj.value = new_url; obj.style.color = "#aaa"; } } } function SetFocus() { calc.input.focus(); } //-->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 options
Redirect type Redirect side Old page file type Old URL server type Is permanent 301 redirect? PHP Server-side .php Apache / Linux yes ASP Server-side .asp IIS / Windows yes ASP.NET Server-side .aspx IIS / Windows yes .htaccess Server-side all Apache / Linux yes IIS Server-side all IIS / Windows yes HTML meta tag Client-side .html all no