Hey guys, just looking for a little bit of help here since I'm a bit confused.
Basically I have a domain. When I type in
http://domain.com, it goes to
http://domain.com, although I'd prefer it to go to
http://www.domain.com.
I've heard ways of doing this, something about modifying the .htaccess file, but I haven't figured out how to do it yet.
Any help would be appreciated, thanks.
What's the domain name?
And, the point of www. is because there are different prefixes for websites.
(10-15-2010, 01:12 PM)Reality Wrote: [ -> ]What's the domain name?
And, the point of www. is because there are different prefixes for websites.
I know about subdomains and the likes, I'd just like to avoid confusion by having all links have www.
The link is
http://runite.org.
(10-15-2010, 01:13 PM)Jake Wrote: [ -> ]I know about subdomains and the likes, I'd just like to avoid confusion by having all links have www.
The link is http://runite.org.
They are the same thing, I don't understand.
www.runite.org is your site. They are pretty much the same thing. Did you just want it to redirect users from runite.org so that when they type that in and go to the link that the address bar at the top automatically puts www in front?
(10-15-2010, 01:21 PM)Infinity Wrote: [ -> ]They are the same thing, I don't understand. www.runite.org is your site. They are pretty much the same thing. Did you just want it to redirect users from runite.org so that when they type that in and go to the link that the address bar at the top automatically puts www in front?
Yeah that's what I was aiming for, e.g.
http://runite.org/webpage redirects to
http://www.runite.org/webpage etc.
.htaccess file is in your root directory..
add this in that file code:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^website.com$ [NC]
RewriteRule ^(.*)$ http://www.website.com/$1 [L,R=301]
</IfModule>
don't forget to change the values to your site domain name though.
Theres a reverse code you can use for making it redirect you from www. to one without the www prefix, but it's all just adding rules to the redirection of the site address.
I can't understand this. When I type www. runite.org it stays www. runite.org.
(10-15-2010, 01:52 PM)ariton Wrote: [ -> ]I can't understand this. When I type www. runite.org it stays www. runite.org.
Type in simply runite.org and see what happens.
Also thanks infinity, I'll try that and see how it works.
(10-15-2010, 01:52 PM)ariton Wrote: [ -> ]I can't understand this. When I type www. runite.org it stays www. runite.org.
Read his OP, he says for you to type in "http://runite.org" and it stays as "http://runite.org". Don't type in www as a prefix
Also, I forgot to mention this, the “mod_rewrite” module has to be enabled in the Apache httpd.conf file. Otherwise URL rewriting will not work using the code I gave you. For enabling this module you need to remove ‘#’ before the
Code:
LoadModule rewrite_module modules/mod_rewrite.so
in your httpd.conf file.
Does www. being added have an affect on anything?