Khi nói đến đường dẫn cho một trang web, chúng cũng biến thành URL. Vì vậy, đường dẫn và URL hoàn toàn giống nhau khi tạo trang web
☛ Tham khảo quy ước đặt tên
Thư mục gốc
Để bắt đầu đường dẫn, chúng tôi cần hiểu cách thư mục của chúng tôi được thiết lập. Thư mục “root” là thư mục chính của trang web. Kho lưu trữ Git của chúng tôi. Nơi trang chủ của chúng tôi cư trú
Nếu hình trên thư mục gốc của chúng ta là
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
4—bạn có thể nhìn thấy nó trên thanh tiêu đề của cửa sổTrang chủ của chúng tôi cho trang web của chúng tôi là tệp
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0 trực tiếp bên trong thư mục //prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
1 của chúng tôi. Đó là tập tin mặc định. Máy chủ web sẽ tự động gọi nó để hiển thị trang chủ của chúng tôi, do đó, nó phải được đặt tên là //prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0Đường dẫn trong cùng một thư mục
Khi tạo một đường dẫn trong cùng một thư mục, chúng ta chỉ cần chỉ định tên tệp của thư mục đó
- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
4 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
4//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
7 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
7//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Ngay cả khi chúng tôi đang ở trong một thư mục và cần truy cập một tệp khác trong cùng thư mục đó, chúng tôi chỉ cần viết tên của nó
- Từ.
9 đến//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
00 — Đường dẫn.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
00//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Chúng ta có thể bắt đầu những đường dẫn này với
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
02 và nhận được hiệu ứng tương tự- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
7 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
05//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
02 là ngầm định, nghĩa là nó sẽ được thêm vào nếu chúng ta không tự thêm vàoDi chuyển vào các thư mục
Để viết một đường dẫn di chuyển vào một thư mục, chúng tôi chỉ định tên thư mục, theo sau là dấu gạch chéo lên, sau đó là tên tệp
- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
00 — Đường dẫn.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
09//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
11 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
12//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Từ.
0 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
14 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
15//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
chỉ mục thư mục con
Nếu một thư mục có tệp
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0 của riêng nó, chúng tôi không cần chỉ định tệp đó trong đường dẫn- Từ.
7 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
0 — Đường dẫn.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
19//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Di chuyển ra khỏi thư mục
Khi di chuyển ra khỏi thư mục, chúng tôi sử dụng
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
00, sau đó làm theo tất cả các quy tắc trên- Từ.
9 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
7 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
03//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Từ.
9 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
11 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
06//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Từ.
9 đến.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
14 — Con đường.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
09//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Nếu bạn cần xóa nhiều thư mục, chỉ cần thêm nhiều thư mục hơn
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0Tương đối so với. tuyệt đối
Tất cả các đường dẫn chúng tôi đã học ở trên đều có liên quan đến vị trí bạn hiện đang ở—được gọi là tài liệu tương đối
- Nếu con đường bắt đầu bằng con số không, điều đó có nghĩa là “hãy bắt đầu từ nơi tôi đang ở và đi từ đó. ”
- Nếu đường dẫn bắt đầu bằng
00, điều đó có nghĩa là “đi lên một thư mục từ vị trí của tôi và sau đó đi từ đó. ”//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Nhưng chúng ta có thể rất cụ thể về con đường của mình, khiến chúng trở nên tuyệt đối
tuyệt đối
Trong đó các đường dẫn tương đối liên quan đến vị trí hiện tại, các đường dẫn tuyệt đối liên quan đến Internet và URL cấp cao nhất
- Nếu chúng ta bắt đầu một đường dẫn với một giao thức [http[s]] thì điều đó có nghĩa là “Bắt đầu ở cấp cao nhất của Internet, thay thế mọi thứ và làm việc từ đó. ”
Nếu trang web của chúng tôi được lưu trữ tại tên miền
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
21, chúng tôi sẽ nhận được các đường dẫn sau//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
Đây là cách chúng tôi viết đường dẫn đến các trang web khác
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0giao thức tương đối
Nếu chúng ta không muốn viết giao thức [https], chúng ta có thể bỏ nó đi và trình duyệt sẽ tự động thêm nó cho chúng ta
Mặc dù vậy, hãy cẩn thận vì trình duyệt sẽ thêm cùng một giao thức mà trang web của chúng tôi hiện đang chạy tại
- Nếu chúng tôi bắt đầu một đường dẫn với
22, điều đó có nghĩa là “bắt đầu ngay sau giao thức, thay thế tất cả các miền và làm việc từ đó. ”//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
1gốc họ hàng
Nếu chúng tôi chỉ muốn viết các đường dẫn trong miền của mình nhưng có nhiều đường dẫn giống như tuyệt đối hơn, chúng tôi có thể sử dụng các đường dẫn tương đối gốc
- Nếu chúng ta bắt đầu một đường dẫn với
23, điều đó có nghĩa là “bắt đầu từ tên miền gốc và làm việc từ đó. ”//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
0Chúng ta sử dụng những thứ này ở đâu?
Mọi nơi
- Trong các liên kết HTML,
24.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
2//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Trong thẻ hình ảnh,
25.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
2//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Khi liên kết CSS,
24.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
4//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Khi sử dụng
27 trong CSS.//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
6//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Trong thanh URL của trình duyệt của bạn để điều hướng xung quanh
Trong “Go to Folder…” của Finder,
28//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
- Dòng lệnh trên máy tính của bạn, hay còn gọi là Terminal
Tại sao nó không hoạt động trên trang web địa phương của tôi?
Một số kiểu đường dẫn khác nhau sẽ không hoạt động trên trang web địa phương của bạn nếu bạn không sử dụng máy chủ web
Lý do những thứ này không hoạt động là vì chúng tôi thường sử dụng giao thức
//prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
29 để xem các trang web của chúng tôi. Nếu bạn kéo trực tiếp tệp HTML của mình vào trình duyệt, hãy xem kỹ URL, URL phải bắt đầu bằng //prehistoric-animals.com/
//prehistoric-animals.com/plesiosaurs.html
//prehistoric-animals.com/dinosaurs/
//prehistoric-animals.com/dinosaurs/apatosaurus.html
//prehistoric-animals.com/css/main.css
//prehistoric-animals.com/images/trex.jpg
29—có nghĩa là nó chỉ có trên máy tính của bạn, không có trên Internet
23 — gốc tương đối sẽ không hoạt động vì nó sẽ liên kết với thư mục gốc của ổ cứng của bạn chứ không phải thư mục gốc của tên miền vì không có tên miền//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
22 — giao thức tương đối sẽ không hoạt động vì giao thức của bạn là//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
23, trong khi mọi thứ khác trên Web là//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
24 hoặc//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
25//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Hai dạng cú pháp này đặc biệt yêu cầu máy chủ web hoạt động bình thường
tóm tắt cú pháp
Đây là cú pháp khác nhau mà bạn cần biết để xử lý các đường dẫn
26 hoặc//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
02 — một dấu chấm + dấu gạch chéo//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Bắt đầu ở cùng một vị trí với tệp này và làm việc từ đó.
Ngầm định, nếu bạn tham chiếu đến tên tệp không bắt đầu bằng dấu gạch chéo, e. g.
0 giống như//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
29//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
00 — dấu chấm kép + dấu gạch chéo//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Bắt đầu ở cùng vị trí với tệp này, mở một thư mục và làm việc từ đó.
Có thể kết hợp.
41 — xuất ra hai thư mục//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
23 — gạch chéo ở đầu//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Bắt đầu từ miền gốc và làm việc từ đó.
22 — dấu gạch chéo kép ở đầu//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Bắt đầu ngay sau giao thức, thay thế tất cả các miền và làm việc từ đó.
44 — giao thức ngay từ đầu//prehistoric-animals.com/ //prehistoric-animals.com/plesiosaurs.html //prehistoric-animals.com/dinosaurs/ //prehistoric-animals.com/dinosaurs/apatosaurus.html //prehistoric-animals.com/css/main.css //prehistoric-animals.com/images/trex.jpg
Bắt đầu ở cấp cao nhất của Internet, thay thế mọi thứ và làm việc từ đó.
Đường dẫn trên máy tính của bạn
Nếu bạn chỉ sử dụng những đường dẫn này trên máy tính của mình, đối với “Chuyển đến Thư mục…” và Terminal, sẽ có một số khác biệt