View Single Post
Old 01-02-2002, 04:47 PM  
m0rph3us
Confirmed User
 
Join Date: Mar 2001
Location: Principality of Sealand
Posts: 2,033
htaccess help please =)

I'm trying to redirect all traffic from a certain domain to a specific page on my server. I sort of have an idea of how to go about it but this code works in the exact opposite way. All traffic from domains other than the two listed are redirected to the page.

Code:
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !http://www.site.com.*$ [NC] 
RewriteCond %{HTTP_REFERER} !http://site.com.*$ [NC] 
RewriteRule /* http://www.mydomain.com/dir/  [R,L]
How can i make it work right?

Also this is only for traffic going to the root of the site. In let's say /images/ i DON'T want this htaccess to apply. Is there a code to add that prevents it to apply the rules to all subdirs of root?

Thanks


------------------
ADULTBOUNCER AVS!

* FREE Unlimited Hosting (ANY SIZE VIDEOS ALLOWED!)
* Free Premium Unique Video Content
* Partner Programs to resell your AVS site
* Recurring By-Monthly Payouts
* Multiple Billers


GET STARTED NOW!
m0rph3us is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote