从../子域路径 [英] Pathing from ../ in subdomain

查看:223
本文介绍了从../子域路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以说,我创建一个子域: http://subdomain.mydomain.com/

Lets say I create a subdomain : http://subdomain.mydomain.com/

这原本是在这个网址: http://mydomain.com/subfolder/folder/

That was originally at this url : http://mydomain.com/subfolder/folder/

如何解决的路径问题   ../ http://subdomain.mydomain.com/

How would I fix pathing issues for ../ on http://subdomain.mydomain.com/

无需更换code在.htaccess?这可能吗?

without a replacing code in .htaccess? is it possible?

推荐答案

让说我有一些masive的结构是这样的。

let say I have some masive structure like this.

现在在这种情况下,我想要做的是在CSS - >风格 - > loginCSS我有一个名为作为登录一个CSS文件,我想采取

Now in this case I want to do is in the css -> style -> loginCSS I have a css file named as login and I want to take that

ca_grain_texture.jpg并将其设置为我的login.html文件的背景,所以我们看到,我们的HTML文件在主目录 而且我们的css文件夹是主目录

ca_grain_texture.jpg and set it as a background of my login.html file so we see that our html files are in the main directory and also our css folder is in main directory

所以,如果我想抓住从我的login.css文件中粮JPG文件。我所要做的财产以后这样的。

so if i want to grab the grain jpg file from my login.css file. I have to do somthing like this.

例如

body{
    background-image: url(../../../images/cs_grain_texture.jpg);
}

写作../每次它会跳到一个文件夹回到类似于CD /在命令行shell。

on writing ../ everytime it will jump one folder back similar to cd/ in command shell.

../意味着它会去loginCSS文件夹。

../ means it will go to loginCSS folder.

../../意味着风格的文件夹。

../../ means style folder.

../../../意味着CSS这是主目录。

../../../ means css which is the main directory.

我希望它有助于理解我理解这种方式,并希望它会清除你的看法。

I hope it helps understanding I understood this way and hope it clears your view.

这篇关于从../子域路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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