|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
#1 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
![]() I have this htaccess file in place at one of my domains...
AuthType Basic RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.amanogawa-sfm.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://amanogawa-sfm.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://www.amanogawa-sfm.com [NC] RewriteCond %{HTTP_REFERER} !^http://amanogawa-sfm.com [NC] RewriteRule /* http://www.amanogawa-sfm.com/index.shtml [R,L] It is placed in a subdir on the server along with a bunch of Adobe PDF files and one html page with links to these PDF files. However when I click on the links to open the PDF files I get an error in Acrobat Reader saying "File does not start with %PDF". Removing the htaccess... and everything works fine. Whats up with that?
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#2 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I don't see any conditions in your rewrite rule.
This is what I use, I just put it in the root of all my domains, RewriteEngine on RewriteOptions inherit RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80.*$ [NC] RewriteRule .*[Jj][Pp][Ee]*[Gg]$|.*[Gg][Ii][Ff]$ http://www.yourdomain.com/bad.html [R,L] |
![]() |
![]() |
![]() |
#3 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
I placed a copy of your htaccess in my subdir... but it doesn't work
![]() It doesn't work either if I place it in the root of the domain...perhaps something needs to be enabled on my server?
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#4 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Are you sure you are on a *nix server? If you are then they could have Mod_rewite disabled.
![]() Are sure that you have your htaccess right, named ".htaccess" without the quotes. Uploaded it as plain text, you don't have the frontpage crap installed on your server? |
![]() |
![]() |
![]() |
#5 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
yeah I'm on a unix server... no Microsoft here.
All my .htaccess files are modelled after the one I posted in the first post and they work fine to disable hotlinking of my pics ![]() Try this link http://www.amanogawa-sfm.com/pensum/SFM%20Bronze.pdf The htaccess is there right now - in place and spelled right ![]()
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#6 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
LOL... of course when I click the link above it works fine
![]() However... if I type the link directly into the url field... it doesn't??
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#7 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Do you have this line in your file?
RewriteCond %{HTTP_REFERER} !^$ That line is what lets you type in a url and get the content. Here is one of my old htaccess files http://cleogoodstuff.com/htaccess.txt |
![]() |
![]() |
![]() |
#8 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Yeah I had that line... but its gone now.
Alas... that takes me back to my original error from Adobe Acrobat Reader "File does not start with %-PDF" ?? ![]()
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#9 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Hmmm... but it appears it has something to do with that particular line. I inserted it again.
Now it is like before... htaccess works if you click my link above... but you can enter the url directly and get the document. However it also gets rid of the error if I click the link internally on my site. Guess I'll have to live with that solution
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#10 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
You do have to be careful of spaces or other invisible characters. The editor that I use can show all invisibles and I've found that it is often what doesn't normally show up that causes problems.
|
![]() |
![]() |
![]() |
#11 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
My guess, and it is a guess as I've not linked to pdf files so far, that it is a similar problem to linking to .wmv files. You are actually launching an external application and htaccess is interpreting the request from Acrobat as a type-in request. If my guess is correct, you'll probably need to drop a cookie 1st then have htaccess test for the cookie's existance before the surfer can load the pdf document(s).
Then again, I could be completely full of shit...
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
#12 |
Are you sure you're an accredited and honored pornographer?
Join Date: Aug 2003
Posts: 68
|
The .htaccess that Cleo gave you only blocks jpg, jpeg, and gif files. Look at the last line where it specifies what file types to look for in the URL.
Have you added Pd Dd Ff to your Rewrite Rule (the last line)? |
![]() |
![]() |
![]() |
#13 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I don't think he is trying to protect PDF files, not like you can hot link them anyway. I think he is having a problem with getting them to load while his image protecting htaccess is in place.
At least that is how I understood his posts. |
![]() |
![]() |
![]() |
#14 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Thats two questions at once
![]() Yes I added Pp Dd Ff to the last line of the htaccess. What I am trying to accomplish is to have a protected area on my site. The protected area consists of one html page that has links on it to various PDF files. The only way I want people to be able to access the html page in this area is via a link that is on a closed section of a messageboard on the site. Does that make sense?
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#15 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Damn, I thought that your anti-hotlinking htaccess was messing with your PDF links.
Here you go, AuthType Basic RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://.*cleos-porn-links.com:80/*$ [NC] RewriteCond %{HTTP_REFERER} !^http://.*cleos-porn-links.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://.*cleos-porn-links.com*$ [NC] RewriteRule /* http://www.cleos-porn-links.com/adult-links/submit.shtml [R,L] I use the above to protect my submit form. If you try to go to my submit form without first coming from my rules page it will kick you back to my rules page. |
![]() |
![]() |
![]() |
#16 | |
If you don’t take a chance the Angels won’t dance
|
Quote:
![]() ![]() ![]() ![]() |
|
![]() |
![]() |
![]() |
#17 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
But Cleo... the htaccess you just posted is identical to the one I originally posted (as far as I can see)... and that didn't work and hence I made this thread
![]() Surfn... LOL You will see things more clearly once you stop smoking weed, stop looking at big boobs, stop spreading gossup, stop making fun of people and stop running around. Of course then your life will be dull and boring... but you will see things clearly ![]()
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
#18 | |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Quote:
At least you know that it should work. ![]() It basically is the same thing as protecting an AVS site so any of the examples that the AVS services give out should work too. You are putting the PDF links on a HTML page and not just having a directory of PDF files right? |
|
![]() |
![]() |
![]() |
#19 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Yes. Links to PDF files on a HTML page. Both the HTML page and all PDF files are in the same sub directory on the server.
__________________
Tittius Maximus - Retired ![]() |
![]() |
![]() |
![]() |
|
|