2012-02-22 46 views
0

任何人都幫我糾正下面的代碼錯誤htaccess的

我想禁用從用戶直接訪問,但在Apache能做到這一點

<Files f1.php, f2.html> 
Order allow,deny 
Deny from all 
</Files> 
+0

'但APACH canr做it'是什麼意思 – 2012-02-22 17:54:47

+0

canr =>可以,可你recorrect代碼 – 2012-02-22 17:56:02

+0

聽起來像你想阻止熱鏈接?請參閱http://stackoverflow.com/search?q=htaccess+prevent+hot+linking – 2012-02-22 18:05:29

回答

1

的多個文件不<Files>指令,批准,休息它爲2,並用它這樣的:

<Files f1.php> 
Order allow,deny 
Deny from all 
</Files> 

<Files f2.html> 
Order allow,deny 
Deny from all 
</Files>