[英]Hide URL when clicking on link?
I did this already, but now where I want to do it again, I cant find the solution to it <.<. 我已经这样做了,但是现在我想再次做一次,我找不到解决方法<。<。
I simply want to hide the URL path when I load different pages. 我只想在加载不同页面时隐藏URL路径。
Example: I click on href='start.html'
and it shows www.someurl.com/start.html
. 示例:我单击
href='start.html'
,它显示www.someurl.com/start.html
。 I want it to always be www.someurl.com
. 我希望它始终是
www.someurl.com
。
I don't want you to write the whole solution for me, a resource where I can read and find the solution would be great! 我不希望您为我编写整个解决方案,而我可以阅读并找到解决方案的资源非常棒!
You can use mod_rewrites. 您可以使用mod_rewrites。
http://corz.org/server/tricks/htaccess2.php http://corz.org/server/tricks/htaccess2.php
It ll be quite helpful 会很有帮助的
This is what exactly you need. 这正是您所需要的。 Simply you need to add ' / ' before each ***href*.
只需在每个*** href *之前添加' / '。
For example: 例如:
href='/start.html'
So that it will display as www.someurl.com/start.html 这样它将显示为www.someurl.com/start.html
You dont really hide the URL, there are different way's to do this - one is to just use PHP to 您并没有真正隐藏URL,有不同的方法可以执行此操作-一种是仅使用PHP来
include('site');
in this case you only see the www.site.com
or www.site.com/index.php
在这种情况下,您只会看到
www.site.com
或www.site.com/index.php
Another would be to just use jQuery to load a site in a DIV element 另一个可能是仅使用jQuery在DIV元素中加载网站
$('#divId').load('siteLocation');
hope that helped! 希望对您有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.