如何为所有页面分配相同的网址 [英] how to assign same url to all pages

查看:101
本文介绍了如何为所有页面分配相同的网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个网站,其网址为: http://localhost:54785/Mobile%20Browser/Login.aspx [ ^ ]

成功登录后,我将重定向到
http://localhost:54785/Mobile%20Browser/ApplicationPage.aspx [ http://abcCorp/Mobile%20Browser [
requirePermission ="false"
type ="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,Intelligencia.UrlRewriter"/>

< system.web>
< httpmodules>
< add name ="UrlRewriter" type ="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter">


< rewriter>
<将url =〜/products/books.aspx"重写为=〜/products.aspx?category = books">
<将url =〜/products/CDs.aspx"重写为=〜/products.aspx?category = CDs">
<将url =〜/products/DVDs.aspx"重写为=〜/products.aspx?category = DVDs">


这是我在web.config文件中的代码.接下来做什么?请帮助
请为我提供代码.紧急.
在此先感谢

I have created a website whose url is: http://localhost:54785/Mobile%20Browser/Login.aspx[^]

After successful login i am getting redirected to
http://localhost:54785/Mobile%20Browser/ApplicationPage.aspx[^] the above url.

Now my requirement is that ihave to show same url either http://abcCorp/Mobile%20Browser[^] in both the pages instead of above urls.



<configuration>
<configsections>


requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />

<system.web>
<httpmodules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter">


<rewriter>
<rewrite url="~/products/books.aspx" to="~/products.aspx?category=books">
<rewrite url="~/products/CDs.aspx" to="~/products.aspx?category=CDs">
<rewrite url="~/products/DVDs.aspx" to="~/products.aspx?category=DVDs">


this is my code in web.config file. What to do next? plz help
Plz provide me the code for it. Its urgent.
Thanks in advance

推荐答案

这是为您提供的解决方案
Here is the solution for you URL Rewriting[^]


您正在告诉您需要将网址更改为以下内容:
http://abcCorp/Mobile%20Browser [ ^ ]
为此,您需要使用UrlRewriting ,还需要购买名为 http://www.abccorp.com的 [^ ],则您可以使用该域托管您的网站.



--Amit
As you are telling you need to change the url to following:
http://abcCorp/Mobile%20Browser[^]
For that you need to use UrlRewriting and also you need to purchase a Domain named http://www.abccorp.com[^] then you can use that domain to host your site.



--Amit


这篇关于如何为所有页面分配相同的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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