lighttpd forum lighty > i think is a redirect think

Posted by Cybernet Cyby
on 04.05.2008 21:49
if a user acces myweb.com
how i can redirect to www.myweb.com


and if acces www.myweb.com should not redirect to the same location

it it possible ?
Posted by Zhenya Kelyarsky (Guest)
on 05.05.2008 18:38
Cybernet Cyby wrote:
> if a user acces myweb.com
> how i can redirect to www.myweb.com
> 
> 
> and if acces www.myweb.com should not redirect to the same location
> 
> it it possible ?

did you try smth like this?

$HTTP["host"] =~ "^domain\.com$" {
  url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" )
}
Posted by Cybernet Cyby
on 08.05.2008 07:43
thank you :D