On 10/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> On Oct 4, 3:59 am, "Hermann Kaser" <[EMAIL PROTECTED]> wrote:
> > > Now I'd like to add something that will makehttp://www.domain.com[anything
> > > else] get permantently redirected to
> > >http://domain.com[anythingelse].
> >
> > > I found this code:
> > > RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
> >
> > I've got my rules like this:
> >
> > RewriteEngine On
> > RewriteBase /
> >
> > RewriteCond %{HTTP_HOST} ^www\.semicir\.cl$ [NC]
> > RewriteRule ^(.*)$http://semicir.cl/$1[R=301,L]
> >
> > RewriteRule ^/?$ /index.py/ [QSA]
> > RewriteCond %{REQUEST_FILENAME} !-f
> > RewriteCond %{REQUEST_FILENAME} !-d
> > RewriteRule ^(.*)?$ /index.py/$1 [L,QSA]
> >
> > --
> > Hermann Käserhttp://theragingche.com/http://semicir.cl/user/hermzz
>
> Following your example sort of I tried:
>
> <IfModule mod_rewrite.c>
>   RewriteEngine on
>   RewriteBase /
>   RewriteCond %{HTTP_HOST} ^www\.utilitymill\.com$ [NC]
>   RewriteRule ^(.*)$ http://utilitymill.com/$1 [R=301,L]
>
>   RewriteCond %{REQUEST_URI} !.*\.css
>   RewriteCond %{REQUEST_URI} !.*\.js
>   RewriteCond %{REQUEST_URI} !.*\.txt
>   RewriteCond %{REQUEST_URI} !/images/
>   RewriteCond %{REQUEST_URI} !/favicon.ico$
>   RewriteCond %{REQUEST_URI} !^(/.*)+code.py/
>   RewriteRule ^(.*)$ /code.py/$1 [PT]
> </IfModule>
>
> with no luck :-(
>
> Does anyone understand how this rewrite stuff works?  Any ideas what I
> should do?

I do, and that should at the very least redirect the www's to the
class C domain.
You can try using RewriteLog and RewriteLogLevel in your Apache to
debug this kind of stuff, it's what I've used before to solve rewrite
issues.

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog

-- 
Hermann Käser
http://theragingche.com/
http://semicir.cl/user/hermzz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to