In previous articles, we have discussed several main aspects of URL Rewrite. In the last article of this series, we will discuss some details and features about different levels of URL Rewrite.
Theoretically, IIS-level URL Rewrite
In previous articles we have talked about several key aspects of URL rewrite. In the last article in this series, we'll discuss some of the details and characteristics of different levels of URL rewrite.
In theory, the IIS-level URL rew
No one may use the method in the previous article to perform URL Rewrite, because the component that provides URL Rewrite is already overwhelming.
The principle of the ASP. NET-level URL Rewrite component is very simple. In fact,
After the URL rewrite, the problem that is often encountered is that the postback destination address in the page is not the address that the client requested, but the address after the URL rewrite. For example, rewrite in one of
There may be no one to use the method in the previous article for URL rewrite because the components that provide URL rewrite are already overwhelming.
Asp. Net-level URL rewrite component is simple enough to listen to the BeginR
Description
The difference between IIRF and Isapi_rewrite is that IIRF does not need to use the escape character \, and isapi_rewrite needs to use the escape character \.
introduce
IIRF is an open-source rewrite URL filter, similar to Apache URL rewrite, based on VC8.0 (which can be recompiled with visual Studio2
Jsp rewrite url, jsp rewrite
As we all know, all web sites produced by java webprogramming end with. JS, and all other websites end with. html. How can this effect be achieved? The reason for this article is that jsp rewrite url needs to be designed to a third-party shelf pa
Download and install the URL RewriteIIS8 The URL rewriting tool is not installed by default, you must download the installation yourself.If you have installed the Web Platform Installer by default on IIS, we can use the platform to automatically install the URL rewrite rewrite
a rewrite to add 301 redirects:When we open the interface for editing inbound rules, we enter our own defined names, choose how to match URLs and the rules used, and rules can choose regular expressions, wildcards, and exact matches, using the regular as an example. Finally in the match URL pattern input. * (regular expression that matches all paths, this is the
ASP. net url rewrite. URL rewriting
I. URL rewriting is the process of intercepting incoming Web requests and automatically redirecting requests to other URLs.For example, if the browser sends a request for Hostname/101. aspx, the server automatically directs the request to
Url rewriting is the process of intercepting incoming web requests and automatically redirecting requests to other URLs.For example, if the browser sends a request for hostname/101. asp tutorial x, the server automatically directs the request to http: // hostname/list. aspx? Id = 101.Url rewriting has the following advantages:Shorten the
the bin directoryThe key is these two sentences.
Indicates that the user-entered Url,d (d+). aspx is a regular expression that matches the file name in the URL (this starts with the letter D, followed by one or more digits, and ends with. aspx). Users can also set themselves according to their own needs.
That represents how to override a
IIS kernel mode and user-mode output caching
lowercase conversion function
overriding mappings to generate alternate URLs during an override
Failed Request tracking support
Awardsdownload URL Rewrite module 2.1
English: WEBPI / x86 / x64
German: x86 / x64
Spanish Language: x86 / x64
French: x86 / x64
Italian Language: x86 / x64
Japanese: x86 / x64
Korean: x86 / x64
Russian: x86 / x
Static url. Can I use regular expressions to obtain URL parameters for routing or rewrite htacess? How do you do this? please give me some advice.
Cainiao believes
The only disadvantage of htacess is that the server environment does not support htacess, so it is difficult to win the system.
What about regular expression retrieval? it is troublesome to call
The above httpmodule method works when the URL you want to override contains the. aspx extension or another extension that is set to ASP. NET. If you do this, you don't need any specific server configuration. You just need to copy your application to the remote server, and it will work normally.
But sometimes, the URL you want to rewrite either has an extension (
chapter 5.④ Configure the website for this project (see my previous post for details). In this example, the website name on my host is www.rewritepath.com.⑤ Test, enter the following URLHttp://www.rewritepath.com/AX.axHttp://www.rewritepath.com/AX.aspxHttp://www.rewritepath.com/sadfsa/sdf/AX.axHttp://www.rewritepath.com/sad/fsa/sdf/AX.aspxActual path: Http://www.rewritepath.com/Test/AX.aspxTest passed, OK, very good!
[Expansion]I. You can use regul
. For example, the settings in the. htaccess file in the directory. However, the translation of the URL has been completed (converted from a URL to a file name), so it is not possible to overwrite the directory level URL at the same time, but the Moe_rewrite module will convert the translated
products. aspx. Therefore, for the above URLs, Request. pathInfo returns "/Books", "/DVDs", and "/CDs" respectively (in case you want to know, the Request Path attribute returns "/products. aspx ").
Then, you can easily write a function to obtain the product category, as shown in this case (the following function removes the previous slash character and returns only "Books", "DVDs ", or "CDs "):
Function GetCategory () As String
If (Request. PathInfo. Length = 0) ThenReturn ""ElseReturn Request
check after the success of the operation.To implement the following example, the Edit Rule property page is shown in the following illustration:
The name of the rule should be unique (not repeated), and the matching string "^article/([0-9]+)/([_0-9a-z-]+)" is a regular expression that matches any URL string that satisfies the criteria:1, starting with the "article/" character sequence.2, after "/" conta
Haproxy.cfg Configuration file Contents#全局配置global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info m Axconn 8192 #chroot的路径 chroot/usr/local/haproxy #运行用户和组的id uid #以守护进程 Form run Daemon #debug quiet #进程数量 based on server performance tuning Nbproc #pid路径 pidfile/var/ru n/haproxy/haproxy.pid# The default global configuration, these parameters are used to configure the Frontend,backe
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.