如何在url中访问具有不同页面名称的页面 [英] how to access page with different page name in url
本文介绍了如何在url中访问具有不同页面名称的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名称为default.aspx的页面,用于将用户创建到他们的个人网页。例如,用户abc和xyz创建他们的网页,如www.zzz.com/abc或www.zzz.com/xyz。当用户创建他们的页面并输入他们的URL,即www.zzz.com/abc时,它将调用default.aspx,但它会显示www.zz.com/abc的网址www.zzz.default.aspx。
谢谢
Manohar
i have page that name is default.aspx to create user to their personal web page. for example user abc and xyz create their webpage like i.e www.zzz.com/abc or www.zzz.com/xyz. when user create their page and enter their URL i.e www.zzz.com/abc it will call the default.aspx but it will display the url as www.zzz.com/abc insted of www.zzz.default.aspx.
Thanks
Manohar
推荐答案
你需要在asp中使用URl重写。净申请
在web.config中添加流动代码
you need to use URl rewrite in asp.net application
Add the flowing code in web.config
<configuration>
<configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="www.zzz.com/abc" to="www.zzz.default.aspx" />
//Some other re-writers to achieve specific requirements.
</rewriter>
</configuration>
这篇关于如何在url中访问具有不同页面名称的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文