我现在有一个ASP .NET Web应用程序。我在我的应用程序中引用一些交叉领域,因此,当用户访问我的网页,我需要确保他们进入完整的域名。
I currently have a ASP .Net web application. I have some cross domain referencing in my application, so when users visit my page, I need to ensure they enter the full domain name.
因此,例如,我需要从重定向
So for example I need to redirect from
someserver/someapplication.page.aspx到
someserver.domain/someapplication.page.aspx我的正则表达式设置搭上URL,如果它不具备domain,也不放任何东西后'someserver /',让我们称之为'REGEXMATCH。我只需要知道什么叫内得到充分的领域 -
I have the REGEx set up to catch the URL if it does not have the domain, also to hold anything after the 'someserver/', lets call this 'RegExMatch'. I just need to know what to call within to get the Full domain -
Response.Redirect({0}+RegexMatch);在先进的感谢。
推荐答案找到了一种方法在应用程序的IIS设置做到这一点。
Found a way to do this in the IIS settings of the Application.
有关任何人有兴趣,下面是详细信息。这就是所谓的URL重写。 www.iis/learn/extensions / URL重写模块/ SEO规则模板。
For anyone that is interested, here are the details. It is called Url Rewrite. www.iis/learn/extensions/url-rewrite-module/seo-rule-templates.
更多推荐
重定向到全域
发布评论