How to make a 301 turn in SEO

1. If the website uses a (Linux+Apache+MySQL+PHP) host, you can use the .htaccess file to do 301 redirection

For example, if /index.html 301 is redirected to http://www.xinlvtian.com, you can put this instruction in the .htaccess file

Redirect 301 /index.html http://www.xinlvtian.com

Convert all URLs without www (http://xinlvtian.com) 301 to URLs with www, including http://xinlvtian.com/about.html to http://www.xinlvtian.com/about. html

2. If you are using a Windows host

Asp代码:
<% @ language=vbscript %>
<% Response .status =”301 moved permanently” response.addheader “location”,”http:www.xinlvtian.com” >

php code:

Header(“http/1.1 301 moved permanently”);
Hrader(“location:http://www.xinlvtian.com”);
?>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324884802&siteId=291194637
301