Like Box 未显示在某些网址中

发布于 2024-12-13 04:49:46 字数 600 浏览 0 评论 0原文

我这里有一个简单而困难的问题,这让我发疯......

显然没有任何代码更改,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷爱 2024-12-20 04:49:46

您正在为 JavaScript 使用相对路径:

<script src="js/scripts.js"></script>

因此,在 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 不存在。您需要将脚本路径更改为:

<script src="/js/scripts.js"></script>

相同的规则也适用于您的某些图像。示例:

<li><a href="#"><img src="images/rss.png" alt="rss"> Acerca</a></li>
<li><a href="#"><img src="images/rss.png" alt="rss"> Sugestões</a></li>
<li><a href="#"><img src="images/rss.png" alt="rss"> Contactos</a></li>

应该是:

<li><a href="#"><img src="/images/rss.png" alt="rss"> Acerca</a></li>
<li><a href="#"><img src="/images/rss.png" alt="rss"> Sugestões</a></li>
<li><a href="#"><img src="/images/rss.png" alt="rss"> Contactos</a></li>

You are using a relative path for your javascript:

<script src="js/scripts.js"></script>

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:

<script src="/js/scripts.js"></script>

Same rule applies for some of your images too. Example:

<li><a href="#"><img src="images/rss.png" alt="rss"> Acerca</a></li>
<li><a href="#"><img src="images/rss.png" alt="rss"> Sugestões</a></li>
<li><a href="#"><img src="images/rss.png" alt="rss"> Contactos</a></li>

Should be:

<li><a href="#"><img src="/images/rss.png" alt="rss"> Acerca</a></li>
<li><a href="#"><img src="/images/rss.png" alt="rss"> Sugestões</a></li>
<li><a href="#"><img src="/images/rss.png" alt="rss"> Contactos</a></li>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文