Joomla 网址问题

发布于 2024-10-17 20:06:45 字数 1321 浏览 5 评论 0原文

您好,我的网站上的 url 重写有问题。我的情况是,该网站已完全 ajax 加载,我正在更改 url 中的哈希值以在网站内导航。当有人将哈希值 url 放入浏览器时,它会加载正确地..有了这个,我遇到了第一个问题,例如facebook上的链接和网站上复制的链接。.这些链接只是joomla生成的SEF url,所以当人们从facebook访问该网站时,我会使用这个链接,我必须解析它并更改为散列值。简单地说,它必须保持一致。一切都正常工作,但今天我在从 Joomla 发送的时事通讯中的链接中遇到了另一个问题。这些链接没有被 Jrouter 解析,所以我在将这些解析为散列形式时遇到了另一个问题。它变得非常复杂,我问这里是否有人知道一些最佳实践来使这种行为发挥作用。

我为我的英语道歉,它可能有点晦涩:)所以下面是一些带有描述的链接,我希望你能得到它,并帮助我;)

http://www.designclub.cz/ --base url没问题,当你点击链接时,哈希值会改变

http://www.designclub.cz/#en/realizace-prehled --哈希形式的 url.. 再次没有问题

http://www.designclub.cz/index.php/en/design --非散列网址,但采用 SEF 形式。再次工作

http://www.designclub.cz/index.php?option=com_content&view=article&id=95:bongio-koupelny&catid=13&Itemid=14 --原始网址,它来了..Joomla会接受它,但是有非哈希url检测,所以有问题,它会卡在404,但这不是要点..很容易修复..但我需要解析它成散列的..我希望你理解..通常我能够解析成正确的形式,但是有问题,在SEF url中是名称od部分和类别而不是非SEF url中的id..我真的不想从数据库中请求这些名称..这是可能的,但这太可怕了:)

所以再次对czenglish的混搭感到抱歉,并感谢您的帮助:)

Hi I have problem with url rewrite on my site..My situation is, that the site is fully ajax loaded and I am changing hash in url to navigate within the site..When someone put the hashed url into his browser, it would load correctly..With this I had first problem, with links for example on facebook and to with copied links on the site..These links are only SEF urls produced by joomla, so I when people comes to the site for example from facebook with this link, I have to parse it and change to the hashed on..Simply it has to be consistent..It all is fully working, but today I got another problem with links in newsletter sent from Joomla..These ones arent parsed by Jrouter, so I have another problem with parsing these ones into hashed form..It is getting to be pretty much complicated, si I am asking if someone here know some best practices to get the kind of behaviour to work..

I apologize for my English, its maybe kind obscure:)So below are some links with description, I hope you will get it, and sould help me;)

http://www.designclub.cz/ --base url no problem, when you will click on links the hash would change

http://www.designclub.cz/#en/realizace-prehled --hashed form of url..again without problems

http://www.designclub.cz/index.php/en/design --nonhashed url but in SEF form..again working

http://www.designclub.cz/index.php?option=com_content&view=article&id=95:bongio-koupelny&catid=13&Itemid=14 --raw url and here it comes..Joomla would accept it, but there is the non-hash url detection, so there is problem, it will stuck on 404, but it is not the main point..It is easy to fix..but I need to parse it into hashed one..I hope you understand..Normally I would be able to parse into correct form, but there is problem, that in SEF url are names od sections and categories insteas id's in nonSEF url..And I really dont want to requets these names from database..it is possible, but it is too horrible:)

So again sorry for this mashup of czenglish and thanks for your help:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

一身软味 2024-10-24 20:06:45

所以已经解决了..它并不完美,但谁在乎:D 现在我正在检测? url中的位置作为重新解析它的条件..如果url中是问号,我让它成为并在下一个ajax请求时更改(我可以完成ajax请求的链接具有所有sef url,所以我可以简单地将其解析为散列形式)

So already solved..It isnt perfect, but who cares:D Now I am detecting the ? position in url as condition to reparse it..If is question mark in url I let it be and change on next ajax request(my links which from can be done ajax request have all the sef url, so I can simply parse it into hashed form)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文