eZ Community » Forums » Setup & design » open pdf file in browser window
expandshrink

open pdf file in browser window

open pdf file in browser window

Tuesday 15 January 2008 3:51:15 pm - 2 replies

hello
i try to create a link to pdf file in the media section. the pdf file should be opened in a browser window. i managed to make the link work with: {$relateditem.data_map.file.content.filepath|ezroot()}, but this only works if i remove my .htaccess file.
can anybody help me with altering the .htaccess file so users can view pdf's. or even better: is there a better way to have users read pdf directly without downloading? thanks..

Tuesday 15 January 2008 9:33:51 pm

You should probably post the rewrite conditions / rules you use in you .htaccess file..

Wednesday 16 January 2008 10:53:29 am

the commented-out lines are the original entries from a fresh install

#<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|pdf))$">
order allow,deny
allow from all
</FilesMatch>

and:

#RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php
RewriteRule !\.(gif|jpe?g|png|css|js|html|pdf)$ index.php

with that it works, but i'm not really sure what it's exactly doing..is it allowing all pdfs to be accessed and not to be redirected to index.php? are there problems with that?

i think my problem is, that my pdf files are not in in a path that includes a pdf directory. they are in a folder called application..

Modified on Wednesday 16 January 2008 10:57:21 am by andre müller

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from