Re: rewrite rule tutorial on ask apache I could not understand syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, uhlar@xxxxxxxxxxx ; 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-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux