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
1. redirect Www.111cn.net to Www.111cn.net
Open the. htaccess file and add the following rules.
The code is as follows
Copy Code
Rewriteengine onRewritecond%{http_host}!^www.111cn.net$ [NC]Rewriterule ^ (. *) $ http://www.111cn.net/$1 [l,r=301]
2. redirect old.com to Www.111cn.net
The code is as follows
Cop
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: S
Because of the need for revision, a section of the fire net needs to do 301 redirects, this is a long time ago the fire under the navigation of a search, using the ASP language, but spiders like, so can not delete, had to write a 301 redirect, but the original many URLs are parameters, such as tag tag, Form such as: Liehuo_tag.asp?q=%c1%d2%bb%f0%cd%f8.
Studied a
The web site from the Sina SAE moved over, the former domain name can also be accessed, so there will be two duplicate sites, not conducive to seo/seo.html "target=" "_blank" > Search engine included, and the previous weight will not be, so do a good link 301 Redirect, Open the Config.yaml file on the SAE:
Handle
The code is as follows
-Rewrite:if (in_header["host"] ~ "^101ban
The nginx301 jump setting is simple and is configured as follows. (The configuration file defaults to nginx.conf, if a new configuration file is developed, the new file configuration is available.)server{server_name xxx.com www.xxx.com;Rewrite ^/(. *) http://www.hablue.com/$1 permanent;}server{server_name xxx.com www.xxx.com;if ($host! = ' www.hablue.com ') {Rewrite ^/(. *) $ http://www.hablue.com/$1 permanent;}}Both of these scenarios can be implemented, remember not to and virtual host configu
Https force redirect without www 301
Many browsers are gradually updated to websites that only support https. Therefore, many http websites need to add https support. In this case, the jump between www and without www is required, because www and without www use different certificates, 301 redirection is required. The solution is as follows:
Here, we use www.bk
From: http://www.bnxb.com/host/win/200811/21-654.htmlGenerally, in IIS, the "redirect to URL" function takes effect only on the home page. 301 of the inner page is redirected to the home page.After checking the data, we found that parameters still need to be added to the 301 redirection.
Reference content is as follows:
$ S transmits the suffix of the requested
Iis7.5+webconfig implement page pseudo-static and 301 redirectUse the Urlrewriter component in Windows 2003 +iis 6.0 to configure the pseudo-static articles on the network in a large heap. However, in the iis7.0 or IIS 7.5 environment configuration of the site basically did not explain, even if there are some useless code snippet, today is very easy to configure the success, send a diary sharing experience.Document Download: http://files.cnblogs.com/
Similar to redirect. php? Tid1_7goto=lastpostthe child content of the URL is the same as that of thread-1-1.html, but the URL format is different. Se will be treated as a duplicate content.This URL format will appear in the last post or last reply position of the home page or forum list page. The previous topic and next topic of the previous discuz7 versions are also such URLs, but the parameters can be found in the Code.
Why not disable this URL-bas
I built a website, not add www and add www are the same page, but no jump, we all know, 301 redirect is a very friendly SEO optimization of a display way. is also an important way to transfer weights.Next, let's modify the. htaccess file to take care of the 301 redirect method, has always felt that this method is the b
I need to site domain name Permanent 301 Redirect, when the user visited tqcto.com, 301 to Www.tqcto.com, referring to a lot of configuration data, have appeared "this page contains redirect loop" problem, after trying many times, found that the following configuration is to solve the problemserver_name www.tqcto.com t
seo:301 redirection
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?
------Solution--------------------
The framework has its own rewrite, the direct write will have the conflict, need you to write before
#强制重定向到wwwRewriteengine onRewritecond%{http_host} ^jb51.net/[NC]Rewriterule ^ (. *) $ http://www.jb51.net/$1 [l,r=301]#强制重定向到不带www的顶级域名Rewriteengine onRewritecond%{http_host}!^jb51.net/$ [NC]Rewriterule ^ (. *) $ http://jb51.net/$1 [l,r=301]Apache will redirect without www domain 301 to a domain name with www configura
Nginx does not support configuration. the htaccess file to achieve 301 permanent redirection and pseudo-static. It must be configured in the Nginx site file (usually in the "/usr/local/nginx/conf/vhost" folder) use the rewrite command. After the fixed link structure of this site is changed, the Nginx 301 permanent redirect configuration is as follows:Re
"This webpage contains a redirect loop" appears when the Nginx control domain name is redirected to 301"
I need to permanently redirect the website domain name 301. When a user accesses tqcto.com, 301 to www.tqcto.com, according to a lot of configuration materials, there is
The web site from the Sina SAE moved over, the former domain name can also be accessed, so there will be two duplicate sites, not conducive to seo/seo.html "target=" "_blank" > Search engine included, and the previous weight will not be, so do a good link 301 Redirect, Open the Config.yaml file on the SAE:
Handle
The code is as follows
Copy Code
-Rewrite:if (in_header["host"] ~
Before you do this, you must first be sure to have a domain name ....Then the domain name points to an external network host address, the normal access to the siteIIS7 after the version of the spectators continue to look down, IIS7 before the version, please stop, I did not do the previous versionFirst confirm that the server's IIS is configured with the "HTTP redirection" feature, I am a novice, so IIS all the features I have installed, hahaOpen IIS, build two website, we temporarily named them
LNMP Nginx If you want to redirect domain name 111cn.net 301 to Www.111cn.net, and Www.111cn.net has been added through Lnmp vhost Add,You can modify the following steps.
Edit the corresponding virtual host configuration file, the general virtual host configuration file is located in:/usr/local/nginx/conf/vhost/domain name. conf, such as the added domain name is www.111cn.net
The configuration file is/usr
1. Add configuration in Web. config 2. Create a new Class library project under the current solution3, a new CS, named: Domain301.csUsing system;using system.web;using system.configuration;namespace domain{public class Redirectnewdomain:ihttpmodule {public void Dispose () {} public void Init (HttpApplication context) { Context. AuthorizeRequest + = (new EventHandler (Process301)); } public void Process301 (object sender, EventArgs e) {HttpApplication app = (HttpApplication) se
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.