All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index  

All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index -> Files, directories (listings!), mime-types and other downloading -> Download images instead of display if &download par. pre
Author Message
admin
Site Admin


Joined: 18 Jul 2006
Posts: 89

PostPosted: Tue Jul 18, 2006 8:51 am    

Download images instead of display if &download par. pre

Reply with quote

If "download" is present in query string, a download dialog will be displayes instead of the image. Modify extensions to apply to other files too.

Code:
RewriteEngine on
#RewriteBase  /adresar
RewriteCond %{QUERY_STRING} ^download$
RewriteRule \.(jpe?g|gif|png)$ - [L,NC,T=application/octet-stream]

Source:http://www.jakpsatweb.cz/server/mod_rewrite/mod-rewrite-priklady.html
Back to top
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.   
View previous topic
View next topic
All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
FreeMind 1.1 Template by AU Templates