Focused

Go Back   Focused > Design and Development > Web Development > Tutorials

» Sponsors

Register Now for FREE!
Our records show you have not yet registered to our forums. To sign up for your FREE account INSTANTLY fill out the form below!

Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
 
Random Question
  I agree to forum rules 

Redirecting sitename to www.sitename

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-05-2008, 01:17 PM
New user
 
Join Date: May 2008
Location: Nagpur
Posts: 28
Rep Power: 0
deshabhishek007 is on a distinguished road
Send a message via MSN to deshabhishek007 Send a message via Yahoo to deshabhishek007
Redirecting sitename to www.sitename

Redirecting your sitename.com to www.sitename.com with help of .htaccess

Create a .htaccess file or add the code to an existing one on your server.

If you are creating a new .htaccess file make sure it is in the root folder of the site.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^sitename.com [nc]
rewriterule ^(.*)$ http://www.sitename.com/$1 [r=301,nc]

Where sitename.com and www.sitename.com will be replaced by your original details of the site itself.

This will only work on apache servers with mod_rewrite enabled.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old NOW
Focused
 
Sponsors
 


__________________

 

  #2  
Old 03-05-2008, 01:23 PM
Sohan's Avatar
Administrator
 
Join Date: Jul 2006
Location: Leicester, UK
Posts: 533
Blog Entries: 18
Rep Power: 13
Sohan is on a distinguished road
Send a message via MSN to Sohan Send a message via Skype™ to Sohan

Quote:
Originally Posted by deshabhishek007 View Post
Redirecting your sitename.com to www.sitename.com with help of .htaccess

Create a .htaccess file or add the code to an existing one on your server.

If you are creating a new .htaccess file make sure it is in the root folder of the site.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^sitename.com [nc]
rewriterule ^(.*)$ http://www.sitename.com/$1 [r=301,nc]

Where sitename.com and www.sitename.com will be replaced by your original details of the site itself.

This will only work on apache servers with mod_rewrite enabled.
Wow! That's a good solid tutorial there! Reps for that.
__________________
Make a free blog with focused!
Arcade167 - The free arcade!
Leicester Personal Trainers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 03-07-2008, 09:19 AM
Digital Guy's Avatar
Semi User
 
Join Date: Jul 2008
Posts: 30
Rep Power: 0
Digital Guy is on a distinguished road

That was a good tutorial. I have a small noob question is this the method that they use when they park a domain? I mean some times when I type one domain it automatically redirect me to some other site. How they are going to make money with it(redirecting the site)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 03-07-2008, 09:22 AM
Sohan's Avatar
Administrator
 
Join Date: Jul 2006
Location: Leicester, UK
Posts: 533
Blog Entries: 18
Rep Power: 13
Sohan is on a distinguished road
Send a message via MSN to Sohan Send a message via Skype™ to Sohan

Quote:
Originally Posted by Digital Guy View Post
That was a good tutorial. I have a small noob question is this the method that they use when they park a domain? I mean some times when I type one domain it automatically redirect me to some other site. How they are going to make money with it(redirecting the site)
That could be either a simple 301 or .htaccess redirect.

They normally redirect to pages with adverts and popups on it which will pay them per hit.
__________________
Make a free blog with focused!
Arcade167 - The free arcade!
Leicester Personal Trainers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
redirection


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 04:40 AM.
©2006, Focused.ORG. All Rights Reserved.
Search Engine Friendly URLs by vBSEO 3.2.0