上面目录的相对链接 [英] relative link for directory above

查看:117
本文介绍了上面目录的相对链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  Root 
-index.html
- adirectory
- > fileinthedirectory.html

我想创建一个相对链接 fileinthedirectory.html index.html /index.html 指向 /adirectory/index.html 的链接不存在。

解决方案



  ../index.html 

或者您可以使用斜杠开始网址,以便从根开始

  /index.html 


I've got a file structure like so

Root
-index.html
-adirectory
 ->fileinthedirectory.html

I'd like to create a relative link from fileinthedirectory.html to index.html since /index.html links to /adirectory/index.html which doesn't exist.

解决方案

To go up one directory you can use:

 ../index.html

or you can start the URL with a slash to start from the root

 /index.html

这篇关于上面目录的相对链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆