You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matus UHLAR - fantomas <uh...@fantomas.sk> on 2010/06/21 09:44:56 UTC

Re: [users@httpd] rewrite rule tutorial on ask apache I could not understand syntax

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@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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] rewrite rule tutorial on ask apache I could not understand syntax

Posted by Tapas Mishra <mi...@gmail.com>.
On Mon, Jun 21, 2010 at 1:14 PM, Matus UHLAR - fantomas
<uh...@fantomas.sk> wrote:
> can you tell usa what are you trying to do?
I am trying to understand what ever was written on tutorial.

Nothing else.Since I could not understand so I posted.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org