Results 1 to 1 of 1

Thread: How can I make sure someone uses

  1. #1
    Senior Member -Oz-'s Avatar
    Join Date
    Mar 2004
    Phoenix, AZ

    Default How can I make sure someone uses

    It is very easy to make sure that a user uses instead of just with a simple piece of PHP code placed at the top of every page.

    PHP Code:

    if (!
    ereg("^www."$server)) { 
    // Assume no www. has been entered 
    Header ("Location: http://www.".$server."/"); 

    Courtesy of sdjl

    You can also use mod_rewrite in your .htaccess file. Put it inside your public_html directory in order for the changes to effect all files/directories.
    RewriteEngine On
    Options +FollowSymlinks
    RewriteCond %{HTTP_HOST} ^domain\.com
    RewriteRule ^(.*)$$1 [R=permanent,L]
    Replace domain and .com as necessary.

    Courtesy of ndns
    Last edited by -Oz-; 04-23-2004 at 01:06 AM.
    Dan Blomberg

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts