seo

Beijing seo_How to set up a website 301 redirect

A few days ago, I wrote an article about a 404 error page. When I mentioned the 404 error, I had to say that 301 redirects were downloaded, because 301 redirects were also used to optimize the website […]

article directories

I wrote an article about404 error pageIf you say the 404 error, you have to say that you have to download 301 redirects, because 301 redirects also plays a very important role in website optimization. Regarding 301 redirects, you can download Baidu to find out what 301 redirects is. For a simple example, you will transfer all the weights of woyoubing.net to www.woyoubing.net. My website https://www.example.com has made a 301 redirect. www.zolfox.com/ belowBeijing seoTell me how to redirect website 301 pages

(1)If you are using a Unix/Linux host, you can use the.htaccess file (files used in Unix/Linux for directory-specific instructions such as passwords, URL redirection, error handling, etc.).

old.html refers to the original page and new.html refers to the targeted new page

For example, go to/old.htm to https: https://www.zolfox.com/new.htm%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%9C%A8.htaccess%E6%96%87%E4%BB%B6%E4%B8%AD%E5%8A%A0%E5%85%A5%E8%BF%99%E4%B8%AA%E6%8C%87%E4%BB%A4%EF%BC%9A

redirect 301 /old.htm https://www.zolfox.com/new.htm

or

redirect permanent /old.htm http://www.23.business/new.htm

If you want to use 301 to redirect all URLs of the form https://sem-home.com to hhttps://www.sem-home.com, including:

http://sem-home.com/about.htm Go to https://www.zolfox.com/about.htm%EF%BC%8C%E5%8F%8A Go to https://www.zolfox.com/dir/index.htm, etc., and you will also use mod_rewrite: https://sem-home.com/dir/index.htm

Options +FollowSymLinks

RewriteEngine on

RewriteCond %{HTTP_HOST} ^sem-home.com [NC]

RewriteRule ^(.*)$ https://www.zolfox.com/$1 [L,R=301]

(2)If you are using a Windows host, you should make 301 redirection settings in the control panel.

HTML cannot make a 301 turn. HTML redirects can only be made for JS or META REFRESH, but it is not a 301 redirect. As soon as HTML is read, it returns a 200 OK status code.

ASP:

<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently” Response.AddHeader “Location”, ” https://www.zolfox.com/”
>
PHP:
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: https://www.zolfox.com/” );
?>

Note: The.htaccess file is just an ordinary text file. You can first create a new TXT text file with the file name. htaccess.txt. After writing the command, remove the following.txt and upload it to the root directory of your website. You don't need to modify Apache settings.

.htaccess can also be downloaded online