Merhaba Arkadaşar
xxxx.com diye bir sitemiz var. ben buna bir klasör oluşturup o klasör içindeki dosyaları indirilebilir yapmak istiyorum.
Örnek: xxxx.com/dosya buraya giren kişi buradaki dosyaları indirmesini istiyorum. Çok basit bir soru ama bu şekilde bir klasör oluşturduğumda
Forbidden
You do not have permission to access this document.
Web Server at xxxx.com
hatası alıyorum. Bunu nasıl aktif edebilirim.
Baski bir hosting firmasında olan sitemde yaptım sorunsuz çalışıyor.
iyi çalışmalar
Web Sitesinde FTP Gibi Dosya Listesi Oluşturma
6
●117
- 23-06-2017, 00:54:21htaccess ile dizin listeleme diye aratsaydiniz bulurdunuz hocam,oflibaba adlı üyeden alıntı: mesajı görüntüle
Options +Indexes
veya
IndexIgnore * - 23-06-2017, 08:55:05Hocam ben bunu denedim de bu komut satırını ekliyorum.azatmetin adlı üyeden alıntı: mesajı görüntüle
Options +Indexes<br /># or #
IndexIgnore *<br />
Aldığım hata
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log. - 23-06-2017, 09:44:45
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Dosyalar</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12"> <ul> <?php $dir = './'; $dosyalar = scandir($dir); foreach($dosyalar as $dosya){ ?> <li><a href="<?php echo $dir."/".$dosya;?>"><?php echo $dosya;?></li> <?php } ?> </ul> </div> </div> </div> </body> </html> - 23-06-2017, 11:34:29Şimdi sorunun peşine bir soru daha yapalım

Ben bu dizine şifre koymak için
aşağıdaki komutu kullandım.
AuthName "Şifre Koruması"
AuthType Basic
AuthUserFile rootFolder/httpdocs/ftp/klasörismi/.htpasswd
require valid-user
Dizine girince şifre istiyor. .htpasswd dosyasını oluşturdum bir dizine attım. Şifreyi özel olarak oluşturma sitesinden oluşturdum ama şifreyi girince kabul etmiyor.
Muhtemelen
rootFolder/httpdocs/ftp/klasörismi/.htpasswd bu yolu yanlış yapıyorum. Bu yolun başında da başka bişeyler yazması lazım galiba. Onu nasıl çıkartabilirim. Hosting firması ile mi görüşmem gerekiyor.
