Jump to content
php.lv forumi

Recommended Posts

Posted

Drošības un citu apsvērumu labad, vēlos noslēgt tiešo piekļuvi saviem web failiem! Respektīvi, failu drīkst novilkt tikai ar linku "/file.php?id=1" nevis "/data/file1.zip"

 

Sākumā man bija doma izveidot iekš /data/ .htaccess failu ar sekojošu ierakstu:

order allow,deny
deny from all

 

Bet ejot uz linku "/file.php?id=1" brouzeris piedāvā novilkt failu ar nosaukumu "file1.htm" nevis kā pareizi būtu "file1.zip"!

Kāds būtu risinājums?

Vai tiešām jāpārkodē engine?

 

PS

 

Runa iet par PHP-Fusion v7 engine!

Posted

Vispareizāk būtu šos failus glabāt ārpus web-pieejamas direktorijas.

 

Un nosaukumu uzstādīt ar headeriem:

Piemēram:

Content-Type: application/x-zip-compressed; name="location.zip"
Content-Disposition: attachment; filename="location.zip"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...