On 15.06.10 18:12, Tapas Mishra wrote:
> http://http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html
> 
>  is a link to a tutorial which mentions following use of ReWriteRule is wrong.
> 
> RewriteEngine On
> RewriteBase /
> 
> RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
> RewriteRule .+ http://www.askapache.com%{REQUEST_URI}
> 
> I could not understand what is the mistake in the above rule?
> Can some one point what is the error which the tutorial is trying to tell.

can you tell usa what are you trying to do? Seems as another attempt to do
simple HTTP redirect to www.askapache.com if host is not www.askapache.com.

This can be done by using third party plugins that can redirect to canonical
name (mod_redirtoservname or mod_common_redirect), or by using name-based
virtual hosting, with the first (default) virtual host redirecting to second
one, with ServerName www.askapache.com and no ServerAlias.


-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Your mouse has moved. Windows NT will now restart for changes to take
to take effect. [OK]

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to