how to convert url to www

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

how to convert url to www

Post by eshban »

hi

suppose my website is http://www.abc.com it is accessed via 2 urls
1) http://www.abc.com
2) http://abc.com

i want that if some user access it via http://abc.com it will automatically switches to http://www.abc.com

any solution that how to do this?
User avatar
EverLearning
Forum Contributor
Posts: 282
Joined: Sat Feb 23, 2008 3:49 am
Location: Niš, Serbia

Re: how to convert url to www

Post by EverLearning »

Take a look at this link:

How to do 301 redirection.

It contains examples how to do redirection using PHP or using Apache.
Post Reply