Like Box 未显示在某些网址中
我这里有一个简单而困难的问题,这让我发疯......
显然没有任何代码更改,Facebook 和 Google+ 之类的框就按照我想要的方式在我的网站的一个部分中显示:http://www.nfrases.com/coragem
然而,在另一方面,它们就消失了,就像在这个页面上一样:http://www.nfrases.com/coragem/1519
唯一的区别是还提供了 id_phrase而不是仅在 php 使用 $_GET 选择的地址中提供 tag_name,然后 mod_rewrite 进行干预。实际地址是:http://www.nfrases.com/tag。 php?tag_nome=coragem&id_frase=1519
我在这里要疯了!有人吗?
I have a simple yet hard problem here that is driving me nuts ...
Apparantly with no code change what so ever the Facebook and Google+ like boxes show as I want in one section of my site: http://www.nfrases.com/coragem
Yet on the other they just disappear, like on this page: http://www.nfrases.com/coragem/1519
The only difference is that a id_phrase is also suplied instead of only supplying the tag_name in the address that is picked by the php with $_GET and then the mod_rewrite intervenes. The actual address is: http://www.nfrases.com/tag.php?tag_nome=coragem&id_frase=1519
I'm going crazy over here! Someone ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在为 JavaScript 使用相对路径:
因此,在
http://www.nfrases.com/coragem
上,它将指向:http://www.nfrases.com/js/scripts.js
但是,在
http://www.nfrases.com/coragem /1519
,那就指向:http://www.nfrases.com/coragem/js/scripts.js< /a>
显然,第二个 URL 不存在。您需要将脚本路径更改为:
相同的规则也适用于您的某些图像。示例:
应该是:
You are using a relative path for your javascript:
So, on
http://www.nfrases.com/coragem
, that would point to:http://www.nfrases.com/js/scripts.js
But, on
http://www.nfrases.com/coragem/1519
, that would point to:http://www.nfrases.com/coragem/js/scripts.js
The 2nd URL doesn't exist, obviously. You need to change your script path to:
Same rule applies for some of your images too. Example:
Should be: