重定向到全域

编程入门 行业动态 更新时间:2024-10-10 16:18:40
本文介绍了重定向到全域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我现在有一个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.

更多推荐

重定向到全域

本文发布于:2023-11-28 20:34:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643865.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   到全域

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!