Greenguy's Board WebcamWiz CRAZY $5,000 Reward Bonuses

WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses

Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2003-09-05, 06:28 PM   #1
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
Question htaccess gurus...

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
JanTM is offline   Reply With Quote
Old 2003-09-05, 06:43 PM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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]
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-05, 08:29 PM   #3
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-05, 08:56 PM   #4
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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?
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-05, 09:15 PM   #5
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-05, 09:17 PM   #6
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-05, 09:23 PM   #7
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-05, 09:29 PM   #8
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-05, 09:34 PM   #9
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-05, 09:45 PM   #10
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-07, 08:05 AM   #11
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
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...
venturi is offline   Reply With Quote
Old 2003-09-07, 03:42 PM   #12
Carrie
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)?
Carrie is offline   Reply With Quote
Old 2003-09-07, 03:46 PM   #13
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-07, 08:07 PM   #14
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-07, 08:15 PM   #15
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-07, 08:16 PM   #16
Surfn
If you don’t take a chance the Angels won’t dance
 
Surfn's Avatar
 
Join Date: Aug 2003
Location: Earth on occasion
Posts: 8,812
Send a message via ICQ to Surfn
Quote:
Originally posted by JanTM
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?
Not to me |rasta|
__________________

Surfn's Links Are you a partner?

Surfn is offline   Reply With Quote
Old 2003-09-07, 09:08 PM   #17
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Old 2003-09-07, 09:15 PM   #18
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Quote:
Originally posted by JanTM
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
Yeah after I posted it I saw that, lol.

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?
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-07, 09:20 PM   #19
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
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
JanTM is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:57 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc