View Single Post
  #2  
Old 03-05-2008, 02:23 PM
Sohan's Avatar
Sohan Sohan is offline
Administrator
 
Join Date: Jul 2006
Location: Leicester, UK
Posts: 550
Blog Entries: 18
Rep Power: 15
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
Reply With Quote