Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding 'www' to domain.
#1
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.
#2
What's the domain name?

And, the point of www. is because there are different prefixes for websites.
#3
(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.
#4
(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?
#5
(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.
#6
.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.
#7
I can't understand this. When I type www. runite.org it stays www. runite.org.
#8
(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.
#9
(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.
#10
Does www. being added have an affect on anything?


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Your suggestions www.sapbasisworld.com mounikasiva 7 1,430 09-21-2012, 03:28 AM
Last Post: jasonjhon
  Death of WWW Jamza 17 3,573 12-02-2011, 11:04 AM
Last Post: Darun
  Official Domain Giveaway | www.y3t.org, www.cashmycoin.com, www.gow3.cc Peter L 10 2,124 11-16-2011, 06:51 AM
Last Post: TalishHF
  Creating A Login/Register Script & Adding Features Closed Account 7 1,493 08-16-2011, 03:14 PM
Last Post: Closed Account

Forum Jump:


Users browsing this thread: 3 Guest(s)