如何使用webconfig页面为我的网站获取用户友好的URL? [英] how do i get an user friendly url for my website using webconfig page?

查看:60
本文介绍了如何使用webconfig页面为我的网站获取用户友好的URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai Everybody,



我想获得一个用户友好的URL来登录我的网站页面。例如我的要求是获取根网址http ://funmpodium.com/喜欢这个登录页面



但是我现在的根URL是http://funmpodium.com/Login.aspx怎么做我得到它。并使用​​下面的代码。



重写

规则

规则名称=HTTP到HTTP重定向stopprocessing =true

匹配url =(。*)

条件

add input ={HTTP} ignorecase =true/>

条件>

操作类型=重定向redirecttype =找到url =http:// {HTTP_HOST} / {R :1}/>

规则>

规则>

重写>





但它是上市直销而不是登录页面。



任何人请帮帮我

Hai Everybody,

I want to get an user friendly url for for login page to my website.for example my requirement is to get a root url "http://funmpodium.com/" like this for login page

but my present root URL is "http://funmpodium.com/Login.aspx" how do i get it.and used the below code.

rewrite
rules
rule name="HTTP to HTTP redirect" stopprocessing="true"
match url="(.*)"
conditions
add input="{HTTP}" ignorecase="true" />
conditions>
action type="Redirect" redirecttype="Found" url="http://{HTTP_HOST}/{R:1}" />
rule>
rules>
rewrite>


but it is listing directies instead of login page.

any one please help me

推荐答案

如果您的关注只是您的登录页面需要登录。你可以实现这个更简单的方法。



IIS有默认的文件设置。



你可以将login.aspx添加到此文档列表中,然后当您点击该应用程序的根目录时,它将加载登录页面。



在IIS 7中配置默认​​文档 [ ^ ]
If your concern is just your landing page needs to be your login. You can achieve this is a far simpler way.

IIS has default document settings.

You can add login.aspx to this list of document and then when you hit the root for that application it will load the login page.

Configuring Default Documents in IIS 7[^]


这篇关于如何使用webconfig页面为我的网站获取用户友好的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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