Geekpedia Tutorials Home

Building a C# Chat Client and Server

Building a C# Chat Client and ServerA step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.

in C# Programming Tutorials

Getting Hard Drive Information

Getting Hard Drive InformationA C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.

in C# Programming Tutorials

UPS Shipping Calculator

UPS Shipping CalculatorThis tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.

in PHP Programming Tutorials

Create Your Own Rich Text Editor

Create Your Own Rich Text EditorCreating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.

in JavaScript Programming Tutorials
Search
Tutorials
Programming Tutorials
IT Jobs
From CareerBuilder

How to redirect www requests to non-www URL

On Wednesday, March 19th 2008 at 12:18 AM
By Andrew Pociu (View Profile)
*****   (Rated 5 with 3 votes)
Advertisement

If you would like to redirect all the requests to the www version of an URL to the non-www version - for example http://www.geekpedia.com to http://geekpedia.com - you can do that by placing the following mod_rewrite rule in your .htaccess file:

RewriteCond %{HTTP_HOST} ^www\.geekpedia\.com$ [NC]
RewriteRule ^(.*)$ http://geekpedia.com/$1 [R=301,L]

The redirect code 301 means Moved Permanently so most search engines will pick this up and send visitors directly to the non-www version of your URL.

Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
by Lewis Cowles on Monday, March 30th 2009 at 03:35 PM

Great tutorial, Im alwas looking at new tips and tricks I always sent 301's through modifying headers but never seen this way of doing it before


Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs Apache Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Sponsors
Discover Geekpedia

Other Resources