1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    wendell, mass, USA
    Rep Power
    Hi, I'm a total newbie to .htaccess.
    I'm trying to set up .htaccess so that if the user is comming from a specific domain name, they will be redirected to a specific directory in my server.
    Please help!!

    thank you
  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    >>comming from a specific domain name

    I assume you are talking about HTTP_REFERER instead of REMOTE_HOST.

    Here you go..

    #place this into your .htaccess file at http://www.mydomain.com/.htaccess

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} www.specificdomain.com/(.*)?
    RewriteRule ^/?$ /specific_dir/ [R]
    #/specific_dir/ should be as http://www.mydomain.com/specific_dir/

    >>I'm a total newbie to .htaccess

    This should be the only method for .htaccess way. You can also write an index.pl script to do the same task.

    A newbie to .htaccess should never try to learn this. BTW, check out -> http://www.apache.org/docs/misc/rewriteguide.html and see if you understand it. If not, check out -> http://www.apache.org/docs/mod/directives.html

    [This message has been edited by freebsd (edited September 03, 2000).]

IMN logo majestic logo threadwatch logo seochat tools logo