Apache Server configuration support - Redirect Question

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > January 2004 > Redirect Question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Redirect Question
CrazyIvan

2004-01-29, 3:36 am

Hi,

I'm running a php-nuke site at lets say "domain.com". For some
reason, php-nuke doesn't like people browsing the site as
"www.domain.com". So what I need to do is whenever someone tries to
access "http://www.domain.com", they automatically get redirected to
"http://domain.com".

What's the best way to do this?

Cheers,
CrazyIvan
Rossz

2004-01-29, 4:35 am

CrazyIvan wrote:
quote:

> Hi,
>
> I'm running a php-nuke site at lets say "domain.com". For some
> reason, php-nuke doesn't like people browsing the site as
> "www.domain.com". So what I need to do is whenever someone tries to
> access "http://www.domain.com", they automatically get redirected to
> "http://domain.com".



mod_rewrite:

RewriteCond %{HTTP_HOST} ^www.domain.com
RewriteRule (.*) http://domain.com$1 [L,R]

--
Rossz
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com