RewriteRule ain't working

software development

#1

I’m trying to keep anyone from outside mydomain.com from linking directly to some pdf files below /documents; this traffic should instead be redirected to /documents.

I’m trying this in an .htaccess file:

RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com/.*$ [NC] RewriteRule \.?(pdf)$ http://www.mydomain.com/documents/ [R,L] but it’s not working at all. Am I close? Way off track? Hep a brother out here?

[color=#0000CC]jason[/color]


#2

actually that does work so there it sits as an example for anyone else that would wanna do such a thing.

:stuck_out_tongue:

[color=#0000CC]jason[/color]