質問編集履歴

6

詳細補足

2023/10/17 03:04

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -29,18 +29,12 @@
29
29
  ```
30
30
  Redirect permanent / "https://hoge.co.jp/"
31
31
  ```
32
- #### エラーログ
33
- ```
34
- ```
35
32
 
36
33
  ### .htaccess#3の場合
37
34
  ```
38
35
  RewriteEngine on
39
36
  RewriteBase /
40
37
  RewriteRule hoge.sakura.ne.jp/ "https://hoge.co.jp" [R=301,L]
41
- ```
42
- #### エラーログ
43
- ```
44
38
  ```
45
39
 
46
40
  ### 結果
@@ -71,6 +65,15 @@
71
65
  </IfFile>
72
66
  ### END XPageSpeed - Do not edit the contents of this block! ###
73
67
  ```
68
+ また、上記コメントアウトしても、.htaccess#2については、
69
+ ブラウザ上では、リダイレクトが繰り返し行われた旨、表示されまさせんでした。
70
+
71
+ #### エラーログ
72
+ ```
73
+ [Tue Oct 17 11:16:24.095943 2023] [autoindex:error] [pid 38287] [client 153.220.76.151:0] AH01276: Cannot serve directory /home/hoge/www/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive
74
+ ```
75
+
76
+ 記述が間違っているのかもしれません。
74
77
 
75
78
  いったん、こちらで様子を見たいと思います。
76
79
  ありがとうございました。

5

補足

2023/10/17 02:55

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -18,6 +18,7 @@
18
18
  RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.sakura\.ne\.jp$ [NC]
19
19
  RewriteRule .* https://hoge.co.jp%{REQUEST_URI} [R=301,L]
20
20
  ```
21
+ #### エラーログ
21
22
  ```
22
23
  [Tue Oct 17 11:16:00.094043 2023] [core:alert] [pid 38294] [client 100.64.0.64:54924] /home/hoge/www/.htaccess: Invalid command 'XPagespeed', perhaps misspelled or defined by a module not included in the server configuration, referer: https://hoge.co.jp/
23
24
  [Tue Oct 17 11:16:00.236174 2023] [core:alert] [pid 32466] [client 100.64.0.64:54925] /home/hoge/www/.htaccess: Invalid command 'XPagespeed', perhaps misspelled or defined by a module not included in the server configuration, referer: https://hoge.co.jp/
@@ -28,12 +29,18 @@
28
29
  ```
29
30
  Redirect permanent / "https://hoge.co.jp/"
30
31
  ```
32
+ #### エラーログ
33
+ ```
34
+ ```
31
35
 
32
36
  ### .htaccess#3の場合
33
37
  ```
34
38
  RewriteEngine on
35
39
  RewriteBase /
36
40
  RewriteRule hoge.sakura.ne.jp/ "https://hoge.co.jp" [R=301,L]
41
+ ```
42
+ #### エラーログ
43
+ ```
37
44
  ```
38
45
 
39
46
  ### 結果

4

自己解決の報告

2023/10/17 02:54

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -52,4 +52,19 @@
52
52
  以上、ご教示いただきたく、どうぞよろしくお願いいたします。
53
53
 
54
54
 
55
+ ### 自己解決
55
56
 
57
+ .htaccess#1の場合のみですが、以下の箇所をコメントアウトして解決いたしました。
58
+
59
+ ```
60
+ ### BEGIN XPageSpeed - Do not edit the contents of this block! ###
61
+ XPagespeed on
62
+ <IfFile /var/xpagespeed/xpagespeed_ctl>
63
+ XPagespeed off
64
+ </IfFile>
65
+ ### END XPageSpeed - Do not edit the contents of this block! ###
66
+ ```
67
+
68
+ いったん、こちらで様子を見たいと思います。
69
+ ありがとうございました。
70
+

3

補足

2023/10/17 02:18

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -12,19 +12,24 @@
12
12
  - [ ] WordPress: あり
13
13
  - [ ] WordPress格納ディレクトリ: /home/hogehoge/www/hogehoge
14
14
 
15
- ### .htaccessの設定#1
15
+ ### .htaccess#1の場合
16
16
  ```
17
17
  RewriteEngine On
18
18
  RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.sakura\.ne\.jp$ [NC]
19
19
  RewriteRule .* https://hoge.co.jp%{REQUEST_URI} [R=301,L]
20
20
  ```
21
+ ```
22
+ [Tue Oct 17 11:16:00.094043 2023] [core:alert] [pid 38294] [client 100.64.0.64:54924] /home/hoge/www/.htaccess: Invalid command 'XPagespeed', perhaps misspelled or defined by a module not included in the server configuration, referer: https://hoge.co.jp/
23
+ [Tue Oct 17 11:16:00.236174 2023] [core:alert] [pid 32466] [client 100.64.0.64:54925] /home/hoge/www/.htaccess: Invalid command 'XPagespeed', perhaps misspelled or defined by a module not included in the server configuration, referer: https://hoge.co.jp/
24
+ [Tue Oct 17 11:16:02.771029 2023] [core:alert] [pid 32537] [client 100.64.0.64:54927] /home/hoge/www/.htaccess: Invalid command 'XPagespeed', perhaps misspelled or defined by a module not included in the server configuration
25
+ ```
21
26
 
22
- ### .htaccessの設定#2
27
+ ### .htaccess#2の場合
23
28
  ```
24
29
  Redirect permanent / "https://hoge.co.jp/"
25
30
  ```
26
31
 
27
- ### .htaccessの設定#3
32
+ ### .htaccess#3の場合
28
33
  ```
29
34
  RewriteEngine on
30
35
  RewriteBase /

2

補足

2023/10/17 01:56

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -37,7 +37,7 @@
37
37
  https://hoge.co.jp
38
38
 
39
39
  上記をブラウザで表示すると、
40
- どの.htaccess表記でも、internal server error になってしまいます。
40
+ どの.htaccess表記でも、internal server error になってしまいます(格納ディレクトリは同じです)
41
41
  さくらサポートでは、個別のリダイレクト設定詳細まではサポートいただけず、
42
42
  途方に暮れております。
43
43
 

1

補足

2023/10/16 07:25

投稿

k.kuri
k.kuri

スコア2

test CHANGED
File without changes
test CHANGED
@@ -41,7 +41,10 @@
41
41
  さくらサポートでは、個別のリダイレクト設定詳細まではサポートいただけず、
42
42
  途方に暮れております。
43
43
 
44
+ ちなみに、.htaccessを配置していない状態ですと、
45
+ https://hoge.sakura.ne.jp/ は forbidden となっています。
46
+
44
- ご教示いただきたく、どうぞよろしくお願いいたします。
47
+ 以上、ご教示いただきたく、どうぞよろしくお願いいたします。
45
48
 
46
49
 
47
50