Redirect without WWW to a WWW domain for Vhost.

Adding redirect to preferred domain with WWW instead of without www.

Use the following .

<VirtualHost *:80>
  RewriteEngine on
  RewriteCond %{HTTP_HOST}                ^$
  RewriteRule ^/(.*)            $1 [L,R=301]
  <Proxy *>
    Order deny,allow
    Allow from all
  ProxyPass /
  ProxyPassReverse /

Then restart the httpd.

And re-test.

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.


Related Post

3 Responses

  1. azwan says:

    For the rest of us, I recommend easy thumbnails –

  2. leychay says:

    for the rest of us, he mean, WINDOWS user.
    hehehe~ 😉

    • HawkEYE says:

      yalah.. forgot to mention that was meant for linux user..
      you can try download live cd for ubuntu and burn into cd and reboot once.. 😎

      i think now ubuntu can also be installed directly on top of windows XP..
      and just behaving like another game.. hehe.. so easy to try ..


Anything to add?