【问题标题】:Many URLs linking to one page许多 URL 链接到一个页面
【发布时间】:2015-05-16 18:57:20
【问题描述】:

我有一个 Joomla 网站example.com 和一个子目录support.example.com

我想给我的客户一个唯一的 URL 来查看内容,这将是 support.example.com/customer1support.example.com/customer2 等等。

我想要的是,无论我有多少客户 URL,它都会自动指向 support.example.com,这将提示用户输入用户名和密码。我知道我可以在每个目录中进行重定向,但我真的不想为每个客户设置一个物理目录,它更像是一个别名。另请注意,我在 1and1 UK 进行托管,我认为我无法更改 httpd.conf 文件。

【问题讨论】:

  • 我不完全确定我明白了,但你可以在 onAfterLogin 事件中使用插件将它们发送到你想要的地方。

标签: url joomla hyperlink


【解决方案1】:

您可以使用 URL 重写来做到这一点。可以翻译

 support.yourdomain.com/customer1/somefile.html
 support.yourdomain.com/customer2/somefile.html

 support.yourdomain.com/help/somefile.html

更好的是,它可以做这样的事情:

 support.yourdomain.com/customer1/somefile.html
 support.yourdomain.com/customer2/somefile.html

 support.yourdomain.com/help/findhelp.php?customer=customer1&file=somefile.html
 support.yourdomain.com/help/findhelp.php?customer=customer2&file=somefile.html

【讨论】:

  • 只是出于好奇,这样的 URL 重写是否有任何意义,或者只是为了美观?查询字符串的版本有什么问题?
  • 查询字符串版本没有问题。但有理由使用其他格式。尝试搜索“搜索引擎友好的 URL”。这个原始问题也是一个很好的用户案例。
猜你喜欢
  • 1970-01-01
  • 2015-06-02
  • 2010-11-18
  • 2013-12-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-01-05
相关资源
最近更新 更多