在 Joomla 中生成组件 SEF URL
我有一个自定义的 Joomla 组件和一个路由器,用于构建我的 SEF URL 以在站点内使用,并且一切通常都很闪亮 - 在内部,我的所有链接看起来和运行都很棒。
我最近路由了一个通过电子邮件发送链接列表的控制器操作,我注意到我的 URL 出现了......时髦 - 希望有人能告诉我原因。
通常,我的路由器会生成一个如下所示的内部链接:
http://localhost/Registry/calendar/265889635/Some-Long-Boring-Event
但是,当我发送电子邮件并通过同一路由器准备相同的 URL 时,我会得到:
http://localhost/Registry/Registry/component/calendar/569555803/Some-Long-Boring-Event
以前有人遇到过此问题吗?
I have a custom Joomla component and a router for building my SEF URL's for use within the site, and everything is usually shiny - internally, all of my links look and act fantastic.
I recently route a controller action that sends a list of links through email, and I've noticed that my URLs are coming out.... funky - hopefully someone can tell me why.
Usually, my router generates an internal link that looks like this:
http://localhost/Registry/calendar/265889635/Some-Long-Boring-Event
However, when I send an email and preparing the same URL through the same router I get:
http://localhost/Registry/Registry/component/calendar/569555803/Some-Long-Boring-Event
Has anybody run into this issue before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查 URL 中的
Itemid
GET 参数。我的猜测是它没有在电子邮件中使用的网址中设置......Check your
Itemid
GET parameter in the URL. My guess is that it's not set in the url used in emails...我会暂时关闭 SEF URL 并获取您想要的链接的非 SEF 版本。比较您正在使用的 URL,看看有什么不同/缺少什么。
I would turn off SEF URLs temporarily and get the non-SEF version of the link you want. Compare that will the URL you are using and see what is different/missing.