![]() |
.htaccess dilemma
I wish to have a third level domain on a seperate server from the root only accessible from another third level domain of the afore mentioned domain. In other words I have vodka.domain.com on one server and I have scotch.domain.com on another server. I only want the surfers to be able to access scotch.domain.com when he clicks a link on vodka.domain.com. Can anyone help a poor girl out?
|
AuthName AllowLocalAccess
AuthType Basic #Limit GET POST# order deny,allow deny from all allow from x.x.x.x #/Limit# Replace #'s with >'s or <'s respectively |
That doesn't seem to cure the problem. Perhaps my httpd.conf file is not configured properly. Would that come in to play in this situation?
|
I think you need something like this on the scotch domain:
RewriteCond %{HTTP_REFERER} !^http://vodka.domain.com.*$ [NC] RewriteRule .*\.htm $ http://vodka.domain.com/403.htm [R,L] so that only if the referring url is vodka.domain.com will it load. Otherwise you get the 403 page redirect. |
Here is mine:
ErrorDocument 404 http://www.all.com ErrorDocument 403 http://www.all.com ErrorDocument 500 http://www.all.com SetEnvIf Referer .xxxsex\.com refer SetEnvIf Referer .all\.com refer1 SetEnvIf Referer .xamocontent\.com refer2 Deny from all Allow from env=refer Allow from env=refer1 Allow from env=refer2 I use this to use a global members area for several sites, works perfectly. You *may* need to contact you host about a special string to go at the top - without this partcilar string, mine doesn`t work- but it won`t necessarily be the string for you- Options +FollowSymlinks - |
Are any special modules required to perform this function?
I.E. mod_rewrite ? |
Quote:
yes |
This should work...
AuthUserFile /dev/null AuthGroupFile /dev/null RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://vodka.domain.com/ [NC] RewriteRule /* http://scotch.domain.com/badlink.html [R,L] Put in notepad and save as .htaccess, then upload to the root directory of your pictures. Hope this helps. :2 cents: |
All times are GMT -7. The time now is 12:39 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123