On Jan 12, 2012, at 11:36 AM, Tito Garrido wrote:
> Using mod_rewrite I got:
>
> # to remove www -> httpd.conf
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [NC]
> RewriteRule ^(.*)$ http://mydomain.com.br/ [R=301,L]
>
> It's redirecting to:
> mydomain.com/webapps/web2py27/web2py/wsgihandler.py/
>
> Any clue what am I doing wrong?
What was the incoming URL?
FWIW, here's one of mine (happens to be in .htaccess, but I think the syntax is
the same):
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^prfound\.org [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://prfound.org/$1 [L,R=permanent]
(So I'm rewriting anything but prfound.org; as a practical matter, I'm only
going to see www.)