This article illustrates the method of asp.net to achieve 404 pages and 301 redirects. Share to everyone for your reference. The implementation methods are as follows:
In a way, 301 redirects have nothing to do with 404 pages. Why I want to get together, because it is very simple to achieve, where I will introduce a.
How to set the 404 page method in the ASP.net record.Below first look at the previous Set
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
Nginx implements permanent (301) temporary (302) redirection
Popular Science:
301 permanent redirect: When a user or search engine sends a browser request to the website server, one of the status codes in the header information returned by the server in the HTTP data stream indicates that the webpage is permanently transferred to another address.
302 temporary ju
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
Popular Science:
301 permanent redirect: when a user or search engine sends a browser request to the website server, one of the status codes in the header information returned by the server in the HTTP data stream indicates that the webpage is permanently transferred to another address.
302 temporary jump is also a status code, meaning that it is temporarily redirected to another URL.
The main difference
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 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
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
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
After using the second-level domain name of sinaapp for a long time, the children's shoes using WordPress for Sae finally completed the Record Filing and can bind the domain name. At this time, we found that the original second-level domain name of sinaapp can also be used, this will affect the indexing of independent domain names by the search engine. Therefore, it is necessary to redirect the second-level
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
So all use Linux host, I will define a 301 redirect to facilitate SEO. Yesterday, as usual htaccess uploaded to the server, did not expect to post the site can not be accessed, a delete will return to normal. Read a lot of code, also did not find any problems. Simply re-learn the URL rewrite method.Normalize URLsDescribe:On some Web servers, a resource can have more than one URL. Standard URLs should be use
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
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.