teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

追記: \.html も

2017/07/26 06:27

投稿

TaichiYanagiya
TaichiYanagiya

スコア12218

answer CHANGED
@@ -20,4 +20,16 @@
20
20
  RewriteRule ^php\.cgi - [L]
21
21
  RewriteRule ^[^/]+\.php$ - [L,H=myphp-script]
22
22
  RewriteRule ^.*/.*\.php$ - [L,H=application/x-httpd-php]
23
- ```
23
+ ```
24
+
25
+ ---
26
+ ###(2017/07/26 15:27) 追記
27
+ トップディレクトリの .html を PHP-CGI で動かしたいということなのですね。
28
+
29
+ ```
30
+ Action myphp-script /php.cgi
31
+
32
+ RewriteEngine On
33
+ RewriteRule ^php\.cgi - [L]
34
+ RewriteRule ^[^/]+\.(php|html)$ - [L,H=myphp-script]
35
+ ```