链接到一个页面的多个URL
我有一个Joomla网站链接到一个页面的多个URL,url,joomla,hyperlink,Url,Joomla,Hyperlink,我有一个Joomla网站example.com和一个子目录support.example.com 我想为我的客户提供一个唯一的URL以查看内容,这些内容将是support.example.com/customer1和support.example.com/customer2等等 我想要的是,无论我有多少个客户URL,它都会自动指向support.example.com,这将提示用户输入用户名和密码。我知道我可以在每个目录中设置重定向,但我并不想为每个客户设置一个物理目录,它更像是一个别名。另外请
example.com
和一个子目录support.example.com
我想为我的客户提供一个唯一的URL以查看内容,这些内容将是support.example.com/customer1
和support.example.com/customer2
等等
我想要的是,无论我有多少个客户URL,它都会自动指向
support.example.com
,这将提示用户输入用户名和密码。我知道我可以在每个目录中设置重定向,但我并不想为每个客户设置一个物理目录,它更像是一个别名。另外请注意,我在1和1 UK拥有主机,我认为我无法更改httpd.conf
文件。您可以通过URL重写来完成。它可以翻译
support.yourdomain.com/customer1/somefile.html
support.yourdomain.com/customer2/somefile.html
support.yourdomain.com/customer1/somefile.html
support.yourdomain.com/customer2/somefile.html
到
更妙的是,它可以做这样的事情:
到
出于好奇,像这样重写URL有什么意义吗?还是仅仅是为了美观?查询字符串的版本有什么问题?查询字符串的版本没有任何问题。但有理由使用其他格式。尝试搜索“搜索引擎友好URL”。这个原始问题也是一个很好的用户案例。我不确定我是否完全明白,但是你可以使用onAfterLogin事件上的插件将它们发送到你想要的地方。
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