質問編集履歴
2
htaccessを追加しました!
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,79 @@
|
|
1
1
|
URLに適当な文字を入れてもページが表示されてしまいます。cssは崩れます。
|
2
2
|
|
3
3
|
Notfoundのページが用意されているので、そのページを表示したいです。
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
http://○○.com/ ← html表示〇 サーバー内に存在〇 css反映〇
|
10
|
+
|
11
|
+
http://○○.com/menu.html ← html表示〇 サーバー内に存在〇 css反映〇
|
12
|
+
|
13
|
+
http://○○.com/menu.html/ ← html表示〇 サーバー内に存在〇 css反映×
|
14
|
+
|
15
|
+
http://○○.com/menu/sonzaisinai ← html表示〇 サーバー内に存在× css反映×
|
16
|
+
|
17
|
+
http://○○.com/menu/sonzaisinai.html ← html表示〇 サーバー内に存在× css反映×
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
こんな感じです。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
htaccessは
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
RewriteEngine on
|
30
|
+
|
31
|
+
RewriteCond %{HTTP_HOST} ^(www.sasakky-dental.com)(:80)? [NC]
|
32
|
+
|
33
|
+
RewriteRule ^(.*) http://sasakky-dental.com/$1 [R=301,L]
|
34
|
+
|
35
|
+
RewriteCond %{HTTPS} off
|
36
|
+
|
37
|
+
RewriteRule ^(.*)$ https://sasakky-dental.com/$1 [R=301,L]
|
38
|
+
|
39
|
+
RewriteCond %{THE_REQUEST} ^.*/index.html
|
40
|
+
|
41
|
+
RewriteRule ^(.*)index.html$ http://sasakky-dental.com/$1 [R=301,L]
|
42
|
+
|
43
|
+
ErrorDocument 404 /notfound.html
|
44
|
+
|
45
|
+
AddHandler php5.6-script .html .htm
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
下の階層のWordPressのディレクトリのhtaccessは
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
# BEGIN WordPress
|
56
|
+
|
57
|
+
<IfModule mod_rewrite.c>
|
58
|
+
|
59
|
+
RewriteEngine On
|
60
|
+
|
61
|
+
RewriteBase /news/
|
62
|
+
|
63
|
+
RewriteRule ^index.php$ - [L]
|
64
|
+
|
65
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
66
|
+
|
67
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
68
|
+
|
69
|
+
RewriteRule . /news/index.php [L]
|
70
|
+
|
71
|
+
</IfModule>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
# END WordPress
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
です。
|
1
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|