www part of the url

  • manuleka
  • Graduate
  • Graduate
  • User avatar
  • Posts: 240
  • Loc: NZ, Wellington

Post 3+ Months Ago

hi, just wondering how can i get my domain to display the www bit of the url if i enter http://mydomain.com ... i seen alot of site when you type in http://domain.com the page loads and the url changes to http://www.domain.com

like i always type in http://google.com and when the forum home page loads, it changes to http://www.google.com
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

I don't really know, but is your site registered as www. etc or etc.com ?
  • ecuador
  • Student
  • Student
  • User avatar
  • Posts: 90
  • Loc: Germany

Post 3+ Months Ago

This is how one of my htaccess files looks like: It rewrites the non-www to www. and in addition, it takes away the index.php so you only see http://www.artviper.net as main page.

Code: [ Select ]
RewriteEngine on
#Define Rewrite Base.
RewriteBase /
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index\.php$ / [R=301,L]
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^artviper\.net [NC]
RewriteRule ^(.*)$ http://www.artviper.net/$1 [L,R=301]
RewriteCond %{THE_REQUEST} (index\.php) [NC]
RewriteRule ^(.*)index\.php$ http://www.artviper.net/$1 [L,R=301]
  1. RewriteEngine on
  2. #Define Rewrite Base.
  3. RewriteBase /
  4. RewriteCond %{QUERY_STRING} ^$
  5. RewriteRule ^index\.php$ / [R=301,L]
  6. Options +FollowSymLinks
  7. RewriteCond %{HTTP_HOST} ^artviper\.net [NC]
  8. RewriteRule ^(.*)$ http://www.artviper.net/$1 [L,R=301]
  9. RewriteCond %{THE_REQUEST} (index\.php) [NC]
  10. RewriteRule ^(.*)index\.php$ http://www.artviper.net/$1 [L,R=301]
  • manuleka
  • Graduate
  • Graduate
  • User avatar
  • Posts: 240
  • Loc: NZ, Wellington

Post 3+ Months Ago

thanks ecuador! it worked :)

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.