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
Jake
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
Jake
>>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).]