简单而言就是:
内部重定向(重写)发生在server内部,client不知情,即浏览器上显示的是访问a.html但实际上收到的却是b.php;
外部重定向则是server端通知client端需要更改URL,并舍弃之前的request。client按要求发送第二个request,server发送对应的文件。如,client第一次发送request要求访问a.html,server告知其这个url已经更改成b.php了,于是client发送request要求访问b.php,server发送b.php给client,并且此时用户看见浏览器URL栏里显示的是.../b.php
http://www.webmasterworld.com/apache/3524863.htm
With an external redirect, your server issues a response telling the requesting client, "That resource has moved - Ask for that content again using this new URL." At this point, the current HTTP request is terminated. The client (e.g. browser or robot) then starts a new HTTP transaction, re-requesting the desired resource using the new URL provided by the server. Because it is a new HTTP request, a browser will update its address bar to show the new URL.
External Redirect:
Client: Issue HTTP request: "GET /page.html"
Server: Send HTTP response: "/page.html has moved, ask for /page2.html instead." Close HTTP request.
Client: Issue HTTP request: "/GET /page2.html" (Note that it is the client's option to follow the redirect.)
Server: Send content of /page2.html, close HTTP request.
In contrast, an internal rewrite simply changes the server filepath associated with a requested URL. If no internal rewriting is applied, then by default, the server uses the part of the requested URL following the domain name as the filepath. But Apache mod_rewrite or ISAPI Rewrite on IIS can be used to completely change the filepath associated with a URL; The most visible example of this is the 'pointing' of all client URL requests to a single page-generation script on a server. Internal rewrites take place within the context of the client's original HTTP request, and the client is unaware that the server filepath used to retrieve or generate the requested content differs from the path-part of the URL it requested.
Internal Rewrite:
Client: Issue HTTP request: "GET /page.html"
Server: Internally rewrite client-requested URL "/page.html" to server filepath "/page2.html", send content of "/page2.html". Close HTTP request.
So, short version:
External Redirect = Tell client to ask for the requested content again using a new URL and HTTP request.
Internal Rewrite == Get content for requested URL from a different server filepath than implied by the requested URL.
The confusion over external redirects and internal rewrites is widespread; Even the Apache documentation frequently refers to "internal redirects" when internal rewrites are being discussed. And mod_rewrite, despite its name, can do internal rewrites, external redirects, or proxy through-puts, depending on the syntax of the mod_rewrite RewriteRule directive used.