Thread: .htaccess Help
View Single Post
Old 11-28-2014, 10:19 PM  
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
Htaccess - THE Ultimate .htaccess

Code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache\.com/.*$ [NC]
RewriteRule \.(gif|jpg|swf|flv|png)$ http://www.askapache.com/feed.gif [R=302,L]
**opps*** you may have a MIME type issue? MPEG-4 Part 14 - Wikipedia, the free encyclopedia

This format is right but you will have to set paths and file types -- he missed JPG and jpeg JPEG if necessary? -- Apache is case sensitive if that has something to do with the pathing problem. Also, any space must be escaped %20... The UNIX rule for naming conventions should be followed if you don't want grief (been there done that before).

If the access is to be restricted in a certain directory, try putting the .htaccess in that directory. Apache reads the .htaccess in each directory in the path to the file's location when it will GET the file.
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote