P
P
PO6OT2015-04-11 12:37:56
Apache HTTP Server
PO6OT, 2015-04-11 12:37:56

What to write in .htaccess so that all files, including index.html, are downloaded and not opened?

Neither helps:
ForceType None
ForceType application/octet-stream

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PO6OT, 2015-04-13
@woonem

SetHandler application/octet-stream
ForceType application/octet-stream

S
ShamblerR, 2015-04-13
@ShamblerR

<Directory /var/www/bitrix-test.klondike-server.ru/web/upload>
    AllowOverride none

<IfModule mod_mime.c>
     <Files ~ \.(php|php3|php4|php5|php6|phtml|pl|asp|aspx|cgi|dll|exe|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp|rb|var)>
          SetHandler text/plain
          ForceType text/plain
     </Files>

</IfModule>
<IfModule mod_php5.c>

In this example, I have all the files in the apload directory open

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question