Forum Moderators: phranque
i have pages in sub domain pointing to files in the my domain and i have mad several htaccess to allow my sub domains to download but with no success
i want htaccess file to alow my sub domains to download the file and deny any other domain from downloading
your help in this matter is extremely appreciated
Welcome to WebmasterWorld!
Please post your code so we can discuss it.
I suspect you're trying to implement access control based on HTTP_REFERER. I should warn you that this method is unreliable at best. A cookies-based access control system is a much better approach, if you're comfortable with the methods needed to implement it.
Jim
[code]
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?example.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?dev.example.com(/)?.*$ [NC]
RewriteRule .*\.(gif¦jpg¦jpeg¦bmp¦exe¦zip¦rar¦ace)$ http://example.com/vb [R,NC]
[code/]
A cookies-based access control system is a much better approach
can you tell me more about this methode and if its better thin htaccess i want to use it
[edited by: jatar_k at 6:47 pm (utc) on July 27, 2005]
[edit reason] examplified url [/edit]
Jim