17

I have an images folder at the following URL.

www.mysite.com/uploads/

On a different page:

www.mysite.com/search.php/

I am trying to access the images wherein, with a correct tag link, however I get the :

Forbidden

You don't have permission to access /uploads/ on this server. 

So I went and started dabbling with a .htaccess file, and I have no idea what I am doing ,I tried looking at some documentation but with no luck, I even took an example off another question..Here is how my .htaccess file looks atm:

<FilesMatch "\.(gif|jpe?g|png)$">
Order allow,deny
Allow from all
</FilesMatch>

<Directory /uploads>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>

Any ideas on how I can have it allow access to that folder?

4

4 に答える 4

8
<Directory /uploads>
   Options +Indexes
</Directory>
于 2012-04-10T14:51:38.843 に答える
3

次のように .htaccess で許可を与えます。

<Directory "Your directory path/uploads/">
Allow from all
</Directory>
于 2012-04-10T10:41:39.353 に答える
1

ルート フォルダーに .htaccess ファイルがある場合は、次の行を追加します。以前に試した他のすべての役に立たないルールを必ず削除してください。

オプション -インデックス

または試してください:

オプション すべて -インデックス

于 2016-08-28T02:05:08.190 に答える