On Tue, Jun 15, 2010 at 1:42 PM, Tapas Mishra <mightydre...@gmail.com> 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.
>

I don't know what he's smoking, I use a rule almost identical to that
in many places.
Perhaps it behaves differently in .htaccess configuration, which is
what he is describing.

The rule I use on a daily basis:

RewriteCond %{HTTP_HOST} !^(altname\.example\.com|name\.example\.com)$
RewriteRule ^/(.*)  http://name.example.com/$1 [R=301,L]

Also, his point about not being able to see what the various variables
are, I kind of see his point, it would be nice to have examples of
what the variables could be, but you can always turn on the rewrite
log to see stuff like that.

Cheers

Tom

---------------------------------------------------------------------
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