http://no-www.org/
I would suggest the opposite. www is depreciated.
add this to the .htacces file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.site\.com [NC]
RewriteRule (.*) http://site.com/$1 [R=301,L]
or, if client insists on having www for some odd reason, simply swap the
www in the above rule.
and, this has absolutely NOTHING to do with php.......
Debbie Woods wrote:
>
> If you are using an Apache web server, you should be able to configure
> this in the httpd.conf file. It would take all of 30 seconds.
>
> ----- Original Message -----
>
> > Hi Friends,
> >
> > My client requires that his site should open only using www in the
> URL
> > like http://www.sitename.com/anypage.php
> <http://www.sitename.com/anypage.php> and no one should be
> allowed
> > to access it using this URL http://sitename.com/anypage.php.
> <http://sitename.com/anypage.php.> If
> some
> > one type this URL http://www.sitename.com/anypage.php
> <http://www.sitename.com/anypage.php> than it
> should
> > automatically convert to http://www.sitename.com/anypage.php
> <http://www.sitename.com/anypage.php>
> >
> > Is it possible? Can I do it in PHP? Can I do it in .htacces file?
> > Which way is better?
> >
> > Waiting for your response.
> >
> > Thanks,
> > Waqas
> >
>
> [Non-text portions of this message have been removed]
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/