Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache(mod rewrite) or Acrobat or hosting problem

Status
Not open for further replies.

hagai

Technical User
Aug 4, 2001
3
CA
Hi, I got a weird problem that doesn’t make sense to me.

I have concluded that it must be a problem with one of the following;
Apache's mod rewrite (doubtful)
Adobe Acrobat reader (maybe)
Bell web hosting (probably)

My .htaccess file look like this;

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^RewriteRule ^.* [R]

Simply put, if you try to access a file outside of my page you will be redirected.

Now the problem occurs when I try to view a pdf file in this directory. The error I get from acrobat is "File does not begin with '%PDF-'". However it in fact does start with '%PDF-' and when I remove the .htaccess file I am able to view the pdf file. Text files are not affected by the .htaccess file.

I have a bad feeling that this is a hosting problem.

Does anyone know if this is an Acrobat issue or a web hosting issue?
Any way to get around it without removing the .htaccess file, that’s a security measure I can’t live without?

PS. It has been my experience that Bell Web Hosting is bad. I would not recommend anyone using it.

Thanks for your help

Hagai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top