Forcing WWW in the URL

This section contains the codes and tips to improve the ranking of your site into the search engines. It will also contain info regarding the Mod Rewrite technique.

Forcing WWW in the URL

Postby MT Shahzad on March 18th, 2008, 5:10 am

If you want to force the www in the url of your domain, then place the following code in your .htaccess files.

Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.geosourcecode\.com$ [NC]
RewriteRule ^(.*)$ http://www.geosourcecode.com/$1 [R=301,L]


Note: change the domain name in the above code with yours :D
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 306
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Re: Forcing WWW in the URL

Postby itrana123 on August 6th, 2008, 8:51 am

thanks its really helpful sir.
itrana123
 
Posts: 2
Joined: August 6th, 2008, 8:45 am
Location: Lahore


Return to SEO - Search Engine Optimization

Who is online

Users browsing this forum: No registered users and 0 guests