PHP implements the 301 redirect code as follows:
Header (' http/1.1 moved Permanently ');/Send 301 Head
Header (' location:http://www. ') $strDomain. $request _uri);//jump to my new domain address
I wrote 301 code with the 301.inc.php file, and it's all on the head of the other file.
//---------------------
Site dead link is not a site will inevitably encounter one of the problems, if you allow dead link no matter, will eventually bring your site into the abyss. For the processing of dead links we can use a 404 error page to tell the search engine and the user that the page does not exist. We can also redirect the page to another page using 301 redirects. Then we have a problem, for the dead link is to use 404 error page processing better o
When you are ready to look at this article, you should already know the role and meaning of the 301 redirect, then there is no more explanation.So the only thing I want to mention is the difference between the domain name band and the non-WWW, and the significance of the 301, details: The difference between the domain name band and the non-wwwHere we take the example of redirecting the domain name "qiankoo.
The 301 jump tells the visitor that the page has always reached a new page. in php, we use the 301 jump function to send the 301 status code to the browser, and then implement the page Jump.
PHP code-only jump
The Code is as follows:
Copy code
Header ("Location: http://www.bKjia. c0m /");?>
However, the returned status code i
Web page changes to the search engine friendly after the best way to do is to do 301 redirect, if not temporarily to some or some of the Web page transfer, we all think to do 301 redirect more appropriate.
Web page changes to the search engine friendly after the best way to do is to do 301 redirect, if not temporarily to some or some of the Web page transfer, we
In php, the 301 redirection implementation method is very simple. we only need to simply use the header to send the 301 status code and then use the header to jump. The effect is the same as that of apache, iis, and nginx.
In php, the 301 redirection implementation method is very simple. we only need to simply use the header to send the
For example, a Web page that has two URLs (for example, Www.x.com/you_10_1 and www.x.com/you_10) points to it.
Now you need to redirect Www.x.com/you_10_1 using 301 to Www.x.com/you_10, how do I do that?
Reply to discussion (solution)
There's no one here???? Ask the great God of the way to teach you
Who's going to answer that?
Do you want to implement it using PHP or a Web server?
What is your Web server?Is it hard for someone to write
301 definition of redirection
301 redirection (or 301 redirection, 301 redirection) is the header information in the HTTP data stream returned by the server when a user or search engine sends a browser request to the website server) indicates that the webpage is permanently transferred to another address.
Other common
301 jump error: use 301 jump to redirect a domain name without www to a domain name with www
Appserv server,
Write this code into the. htaccess file and the server reports an error.
RewriteEngine OnRewriteCond %{HTTP_HOST} ^xxx.net [NC]RewriteRule ^(.*)$ http://www.xxx.net/$1 [L,R=301]
This error is reported,
500:
Internal Server Error
The server encount
For example, when I want to access www. domainA. com1.js, I will automatically redirect 301 to www. domainB. com2.js. How to do it? For example, when I want www.domainA.com/1.js to be accessed, I will automatically redirect 301 to www.domainb.com/2.js. How to do it?
Reply content:
For example, when I want www.domainA.com/1.js to be accessed, I will automatically redirect
Concept
301 Moved Permanently The requested resource has been permanently moved to a new location, and any future references to this resource should use one of several URIs returned by this response. If possible, clients that have link editing capabilities should automatically modify the requested address to the address returned from the server. Unless otherwise specified, the response is cacheable. The new permanent URI should be returned i
Why use 301 redirection?
There are many situations where webpage redirection is required during website construction, such as webpage directory structure change, webpage rename, webpage extension change, and website domain name change. If no redirection is performed, the old address in the user's favorites and search engine database can only give the visitor a 404 error page, and the access traffic is lost. In addition, all the previous page accumulat
Http status code: 301, 302 redirection, 302 redirectionConcept
301 Moved Permanently the requested resource has been Permanently Moved to a new location, and in the future, any reference to this resource should use one of several Uris returned by this response. If possible, clients with the link editing function should automatically change the requested address to the address returned from the server. Thi
ISAPIRewrite is the most widely used rewrite component in IIS. With this component, You can implement the mod_rewrite function in Apache. For Seo, is the basic equipment for 301 redirection in IIS.
Currently, most of the versions on the Internet are older than version 1.3. We recommend that you use the latest ISAPI rewrite 3 with better functions and more flexible and rich rules. ISAPI rewrite 3 is divided into commercial version and free Lite version
the Redirect is mainly to the domain name a jump to domain B, more often than not with the domain name of the WWW jump to the domain name with www, then 301 redirect how to do it, this article detailed introduction of the 301 redirect practice, the following is divided into Linux host, Windows host and VPS host three kinds of circumstances tell (all to the site domain name yedward.net jump to www.yedward.n
What is a 301 redirect? 301 redirect is when your site address changes, such as changing the domain name, website revision, etc., you want visitors or search engines to jump to a new address to visit the site, then you need to do 301 redirect. There are many ways to achieve 301 redirects, this article mainly describes
Recently, my friend said that he is going to change the domain name, the reason is very simple, they do not have the Domain name Management Authority (Khan, beginning he did not know this, resulting in the accumulation of 5 years the weight of the domain name is completely for others to accumulate). So I agreed to give him 301 weight transfer. In fact, in this case, began to progress very well, but during the 301
301 Redirect is an "electronic map" that is usually used to tell a Web browser to take a visitor from a particular page to another page on your site. When we use the 301 redirect properly, it will help your site rank in organic search and ensure that your potential customers or visitors can have a smoother and more enjoyable experience when using your site. We can also think so,
I bought a space in the host house some time ago. It seems pretty good, but the virtual host is windows. After asking about the space, I said it does not support 301 redirection. The customer service said it could be implemented using a program, finally, the experiment was successful after I found it on the Internet. In fact, the method is very simple. Create a directory, bind the domain name to this directory, and then create a new index in this dire
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.