Apache/htaccess

勉強サイト:https://www.javadrive.jp/apache/#section_htaccess

ティレクトリのリスト表示を無効にする

Options -Indexes -ExecCGI

CGI実行を無効にする

Options -ExecCGI

html,php以外はアクセス拒否

<FilesMatch "\.(html|php)$">
    Order allow,deny
    Allow from all
</FilesMatch>

<FilesMatch ".*">
    Order deny,allow
    Deny from all
</FilesMatch>

htmlをphpとして実行する

<FilesMatch "\.html$">
  AddType application/x-httpd-php .html
</FilesMatch>

トップ   一覧 検索 最終更新   ヘルプ   最終更新のRSS