相対アドレス&絶対アドレス
相対アドレス&絶対アドレス
相対アドレス
黄色い枠の中をフォルダとします
- index.html
- main_a.html
- main_b.html
-
sub_1
- index.html
- sub_1_a.html
- sub_1_b.html
-
sub_3
- index.html
- sub_3_a.html
- sub_3_b.html
-
sub_5
- index.html
- sub_5_a.html
- sub_5_b.html
-
sub_2
- index.html
- sub_2_a.html
- sub_2_b.html
-
sub_4
- index.html
- sub_4_a.html
- sub_4_b.html
-
image
- index.html
- image_1.jpg
- image_2.jpg
- 黒い色のファイルから黒い色のファイル
- main_a.html そのまま
-
黒い色のファイルから
緑のファイル
-
sub_1/
sub_1_a.html
sub_1/
↑緑のファイルが
入っているフォルダを指定
-
黒い色のファイルから
赤のファイル
-
sub_1/
sub_3/
sub_3_a.html
-
黒い色のファイルから
ピンクのファイル
-
sub_1/
sub_3/
sub_5/
sub_5_a.html
-
ピンクのファイル
から
赤のファイル
-
../sub_3_a.html
../ ← 1つ上のフォルダへという意味
-
ピンクのファイル
から
緑のファイル
-
../../
sub_1_a.html
-
ピンクのファイル
から
黒い色のファイル
-
../../../main_a.html
-
ピンクのファイル
から
紫のファイル
-
親フォルダ同士が
並んでいるところまで戻ります
紫のファイル
の親フォルダ
sub_2
と
ピンクのファイル
の親の
sub_1
と
黒い色のファイルが並んでいます
黒い色のファイルのところまで戻り
../../../
あとは
のように
../../../
sub_2/
sub_4/
sub_4_a.html
すべてのフォルダに index.htnl を置いて下さい。
置いてないとファイルが全部見えてしまいます。
このように
相対アドレスで表記しておけばサーバー移転の場合
ファイルの中のアドレスを書き換える必要がありません
gaiaX の場合は絶対表記のみです
絶対アドレス
http://www.geocities.jp/*****/
このように http:// から始まるアドレスです