保持网站的网址不变导航到另一个页面时? [英] Keep website url constant when navigating to another page?
本文介绍了保持网站的网址不变导航到另一个页面时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望我的网站地址栏,当我去子页面不改变它的地址,它应该显示我的 index.html的
,即使我进入tosub页。
I want my site address bar not to change its address when I go to subpages, it should show my index.html
, even though I enter tosub pages.
一样,如果我打开 www.xyz.com
和我浏览到任何页面应该仍然显示 www.xyz.com
。
Like if I open www.xyz.com
and I navigate to any page it should still show www.xyz.com
.
我听说这可以用的.htaccess
做的是这可能吗?
I heard this can be done with .htaccess
is it possible?
推荐答案
您真的应该好好想想为什么你想要它,因为这种工作方式也有一些缺点与它:
You really should think about why you want it, because this way of working has a couple of drawbacks with it:
- 用户不能看到它们是在不同的页面
- 用户不能书签您的页面快速访问
- 用户不能共享链接的海誓山盟
- 在搜索引擎可能会遇到麻烦蜘蛛在你身边
但基本上有两种主要的方法可以做到这一点:
But basically, there are two main ways to do this:
- 使用帧。把网页变成一个框架,所有的环节留在这个框架。
- 使用JavaScript。让每个页面加载到当前页面,使用AJAX。
这篇关于保持网站的网址不变导航到另一个页面时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文