Forum Moderators: phranque
Absolute URL
If an absolute URL is specified, mod_rewrite checks to see whether the hostname matches the current host. If it does, the scheme and hostname are stripped out and the resulting path is treated as a URL-path. Otherwise, an external redirect is performed for the given URL. To force an external redirect back to the current host, see the [R] flag below.
RewriteRule ^foo http://example.com/bar.php [L]
RewriteRule ^foo http://example.com/bar.php [L]
RewriteRule ^foo /bar.php [L]
Perhaps the document is wrong?
Note: Substitution of Absolute URLs
When you prefix a substitution field with http: //thishost[:thisport], mod_rewrite will automatically strip that out. This auto-reduction on URLs with an implicit external redirect is most useful in combination with a mapping-function which generates the hostname part.
Remember: An unconditional external redirect to your own server will not work with the prefix http: //thishost because of this feature. To achieve such a self-redirect, you have to use the R-flag.
Why does it say "implicit external redirect" (emphasis my own)?
I am reading this differently - that the word "implicit" is because they want to say that it will do external redirect even though there is no [R] specified.
[edited by: penders at 5:56 pm (utc) on Mar 31, 2015]
I cannot think of something fourth.
or the identification of identical "scheme & host" is not the way we think it is