重定向到子目录 [英] Redirect to subdirectory

查看:102
本文介绍了重定向到子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的default.aspx页面位于IIHHWebsite文件夹下,因此我需要输入www.sanitationjagat.com/IIHHWebsite。但我想通过只输入www.sanitationjagat.com来调用default.aspx页面。请帮助。

解决方案

.NET中有2个选项可将页面重定向到目标页面。



Response.Redirect :Response对象的Redirect方法提供了一种实现客户端重定向的方法。



Server.Transfer :Server对象的Transfer方法使用服务器执行重定向并避免HTTP请求。

My default.aspx page is under IIHHWebsite folder so i need to type www.sanitationjagat.com/IIHHWebsite. But I want to call default.aspx page by only typing www.sanitationjagat.com. Please help.

解决方案

There are 2 options in .NET to redirect a page into target page.

Response.Redirect: The Redirect method of the Response object provides a way to implement client-side redirection.

Server.Transfer: The Transfer method of the Server object performs redirection using the server and avoiding HTTP requests.


这篇关于重定向到子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆