address, you can use the following 301 redirects to redirect several other forms to the URL, Add the following lines to your. htaccess: (Note that you must be running an Apache server)
Rewriteengine onRewritecond%{http_host} ^yoursite.comRewriterule ^ (. *) $ http://www.yoursite.com/$1 [r=301,l]
# Redirect Client index.html requests to '/'Rewritecond%{the_request} ^[a-z]{3,9}/index.html http/Rewriterule ^i
The code is as follows
Copy Code
1.RewriteCond%{http_host} ^111cn.net$ [NC]2.RewriteRule ^ (. *) $ http://www.111cn.net/$1 [l,r=301]
. htaccess set 301 method, old domain name to new domain name
To set the method:
The code is as follows
Copy Code
Rewriteengine onRewritecond%{http_host} ^olddomain.com [Nc,or]Rewritecond%{http_host} ^www.olddomain.com [N
Create. htaccess files//Can be done under Windows CMD or through a text editor
The 301 redirect code is as follows:
The code is as follows
Copy Code
Rewriteengine onRewritecond%{http_host} ^abc.com [NC]Rewriterule ^ (. *) $ http://www.baidu.com/$1 [r=301,l]Rewritecond%{http_host} ^www.abc.com [NC]Rewriterule ^ (. *) $ http://www.baidu.com/$1 [r=
The author's SEO blog does not use 301 redirect, mainly the virtual host does not support, or not. The 5 recommendations that preceded the standardization of URLs were mentioned slightly, but a situation was overlooked.
Under normal circumstances, we see in the search results page are omitted the default homepage, the main construction station program language has asp/php/jsp/.net, its default home page is generally index.html/index.htm/index.php/ind
PHP url rewriting file (. htaccess) brings us great convenience, as long as the following code can achieve non-www 301 jump.
The Code is as follows:
Copy code
1. RewriteCond % {HTTP_HOST} ^ bKjia. c0m $ [NC]2. RewriteRule ^ (. *) $ http://www.bKjia. c0m/$1 [L, R = 301]
. Htaccess setting 301 method, old domain name to new domain nam
Configure the domain name 301 JumpIn the case of two domain names we need to set up a primary domain (the secondary domain name jumps to the main domain), the operation command is as follows:Vim/usr/local/apache2/conf/extra/httpd-vhosts.confIn # Customlog "Logs/dummy-host.example.com-access_log" common the following line is added as follows:Rewriteengine onRewritecond%{http_host} ^www.aaa.com$Rewriterule ^/(. *) $ http://www.test.com/%1 [r=
301 jump must be implemented by a program or server. If it is a page Jump, JavaScript or page html can be used. Next we will introduce the page Jump, and then introduce the 301 jump. 301 jump must be implemented by a program or server. If it is a page Jump, JavaScript or page html can be used. Next we will introduce the page Jump, and then introduce the
page under diagnosis lists URLs that Googlebot cannot crawl due to redirection errors.300 (multiple options) for requests, the server can perform a variety of operations. The server can select an action based on the requestor (user agent) or provide a list of actions for the requestor to select.301 (permanently moved) The requested page has been permanently moved to a new location. When the server returns this response (a response to a GET or HEAD re
4.0 provides 301 steering Redirectpermanent Use this function to turn the HTTP status code to 301Notes redirectpermanent (String) Method overload provides a 301 HTTP status code in the response and includes the URL to redirect the request to. " >redirectpermanent (String) method overload provides a 301 HTTP status code, In the response, and contains the URL tha
Directory 301 The code is as follows:Copy code RewriteCond % {REQUEST_URI} ^/down/mb/RewriteRule ^/down/mb/(. *) http://mb.111cn.net/#1 [R = permanent, L] In this way, if the current domain name contains the down/mb/directory, it will automatically jump to the 301 to the mb.111cn.net directory.Domain 301 The code is as follows:Copy code RewriteCond % {HT
Jquery's front-end development site does not get 301 redirection. Under site domiam, all websites with WWW and without WWW are available, so SEO experts will distribute their weights.Next we will talk about 301 redirection: this is a basic term in Seo and will be used in URL normalization. We may all know this term, but because it is not used very frequently, as a result, many Seo professionals are not very
problem: implicit forwarding and explicit forwarding.Implicit forwarding: The forwarding method is similar to the cname alias. The DNS server actually forwards the data, but the user does not see the forwarding effect when it returns the data to the browser.Explicit forwarding: The forwarding method is similar to redirection. The DNS server actually forwards data, which can be seen in the user's browser.Implicit forwarding is disabled by most administrators because real domain names are hid
When your site domain name changes or the webpage address changes (the webpage storage directory or the webpage file name changes), how can you ensure that the site's traffic from search engines will not be lost during the transition period, can I update the webpage address in the search engine results? 301 redirection is an ideal solution to this problem. It can direct users and search engines to the correct webpage. The code is as follows:Copy
ASP Tutorial/asp.net Tutorial/php Tutorial Implementation of 301 redirect code, generally we do 301 is the full use of iis,apache to achieve, in the absence of the operation of the server when we use the script to implement, the code is as follows.1, ASP under the 301 redirect Code
Response.status= "Moved Permanently"
Response.AddHeader "Location", "106/"
%>
IIS server to do 301 directional detailed version, in the past we see how to do 301 orientation is not detailed, never done, how to see all do not understand, now I put a detailed plan to introduce.
First: The first to enter the remote server, how to enter it? Enter MSTSC at the beginning of the lower left corner of the computer. Figure 1 appears
Figure 1
Second, select your VPS IP. Click on
301 Moved PermanentlyThe 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 in the location domai
Recently, lazy cancer has been committed, and had been wanting to do things for 1 months. Short connect This before the work of sending SMS is used, the general large site will have its own short link generation site, our company also has. Of course, this time I want to get on my own server.Short connection principle: upload the website address to MySQL to obtain the self-increment ID, and then encrypt the string output to the page. When a short connection is called, back-end decryption gets the
Nginx URL automatically slashes the problem and 301 redirects, the URL points to a directory and in the end does not contain a slash, will 301 redirect jumps, add server_name or modify access redirection.
Nginx URL automatic slash problem and 301 redirect
The internal server uses Nginx, does the website test use. Different domain names use port number distincti
In PHP 301 REDIRECT implementation is very simple, we simply use the header to send 301 status code, and then use header to jump, the effect and Apache,iis,nginx are the same effect oh.
One: This method is more recommended because it can transfer all the URLs of Http://www.jb51.net to Http://jb51.net's new address.
The code is as follows
Second: Single-page multi-station Php301 redirection c
According to research found that some of the Web site in the revised version of the situation is different, will encounter new and old sites included in the problem, the flow of the site to bring a certain loss, under the current circumstances suggest that the site should not be frequently revised, if the revision is recommended in the revised version of the old and new content after a period of time and then set 301 Jump Mode, As much as possible to
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.