不使用框架从域名转发
我拥有一个域名,例如 www.mydomain.com
我还拥有一个 Web 服务器,例如 www.myserver.com
通过 www.myserver.com 导航到我的 Web 服务器后,单击我的服务器文件结构中不同页面的链接将导致URL 更改...
例如,
单击 main.html 的链接将导致 www.myserver.com/main.html
但是,如果我从我的域名 www.mydomain.com 使用框架转发并执行相同的操作,则 url不会改变,因为只有包含 myserver 内容的内部框架会被改变...
我知道这是使用框架的一个基本问题,但是必须有某种方法来维护带有域名的完整 url,即
www.mydomain.com/ main.html
我已经成功地通过框架实现了这一点,方法是使链接使用
href="www.mydomain.com/main.html"
而不是
href="main.html"
但这似乎是一个有点肮脏的方法我的意见。有什么想法吗?
这可能是一个非常愚蠢的问题。
I own a domain name e.g. www.mydomain.com
I also own a web server e.g. www.myserver.com
After navigating to my web server via www.myserver.com clicking on links to different pages within my servers file structure will result in a change in URL...
For example
Clicking on a link to main.html will result in www.myserver.com/main.html
However if I use framed forwarding from my domain name www.mydomain.com and perform the same action the url will not change since only the internal frame containing myserver's content will be changed...
this I know is a fundemental problem with using frames, however there must be some way of maintianing a full url with the domain name i.e.
www.mydomain.com/main.html
I have managed to achieve this with frames by making the links use
href="www.mydomain.com/main.html"
instead of
href="main.html"
But this seems to be a bit of a dirty method in my opinion. Any ideas?
This is probably a very stupid question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么使用“框架转发” 看来您真正想要的是 www.mywebserver.com 中的内容/数据显示在 www.mydomainname.com 下。
只需将域添加到网络服务器的配置中并让它提供内容即可。无需框架。
Why use "framed forwarding" It would seem what you are really wanting is the content / data from www.mywebserver.com to show up under www.mydomainname.com .
Simply add the domain to your webserver's configuration and let it serve the content. No frames necessary.