用户帐户的 URL 重写
目前,我们将domain.com/username 重定向到domain.com/setsession.asp?u=username,然后重定向到domain.com/theapp 上的应用程序。
这意味着用户始终会看到domain.com/theapp,因此浏览到的页面会显示domain.com/theapp/somepage.asp
希望将其移动到子域
username.domain.com
(我们将获取主机名并从中找出用户)。如何设置?我们是否应该将应用程序本身移至 theapp.domain.com,然后将 username.domain.com 重写为 theapp.domain.com 并且一切正常?
如果是这样,我们如何进行 URL 重写(通过 ISAPI Rewrite for IIS 或 URL Rewriting for IIS 进行 mod_rewrite)以便我们仍然可以访问 webmail.domain.com 等?
We currently have domain.com/username redirected to domain.com/setsession.asp?u=username which then redirects to the app at domain.com/theapp.
This means users always see domain.com/theapp, so browsing to a page shows domain.com/theapp/somepage.asp
Looking to move this to subdomains ie
username.domain.com
(we'll get the host name and work out the user from that). How can this be set up? Should we move the app itself to say theapp.domain.com and then rewrite username.domain.com to theapp.domain.com and everything works?
If thats right, how can we do the URL rewrite (mod_rewrite via ISAPI Rewrite for IIS or URL Rewriting for IIS) so that we can still access webmail.domain.com, etc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只想将
domain.com/username
移动到username.domain.com
,您可以使用 mod_rewrite 执行此操作:If you just want to move
domain.com/username
tousername.domain.com
, you can do this with mod_rewrite: