Help
-
Search
-
Members
-
Calendar
Full Version:
domain.com to www.domain.com
The Planet Forums
>
Control Panels
>
Plesk
alx
Nov 27 2005, 09:51 AM
hi all
I want users that enter into domain.com to be redirected to
www.domain.com
What is a good approach to this? Play with the DNS settings or create a new domain entry that will simply redirect?
TIA
Alex
Squire
Nov 27 2005, 10:28 AM
Simply set up an .htaccess for the domain Alex. Leave your vhost.conf exactly the way it is.
CODE
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} !^www.domain.com [NC]
RewriteRule ^(.*)$ [url="http://www.domain.com/$1"]http://www.domain.com/$1[/url] [R=permanent,L]
The above will also redirect any aliased/parked domains you have over to the real one. Works great for the search engines too.
alx
Nov 27 2005, 01:12 PM
well... Squire.. thanks for the 32472397294898034th time!
cory_howell
Dec 6 2005, 02:27 PM
I assume this will work regardless of the server control panel, correct?
Can someone please confirm?
Squire
Dec 7 2005, 06:39 AM
Yup, it'll work on any *nix server where mod_rewrite is enabled.
IIS is another story.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2009
Invision Power Services, Inc.