拦截URL并将所有内容重定向到一个页面 [英] Intercept URL and redirect all to one page

查看:74
本文介绍了拦截URL并将所有内容重定向到一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能很容易但我在其他代码中太深入了解这一点。



我需要所有传入的页面请求打开到同一页面,除非它是回发。换句话说:.domainname / qs1和.domainname / qs2和domainname / qs3都应该打开.domainname / something.aspx但不是如果它是回发。仅限传入请求。从那里,我会解析URI并将其他参数发送到db调用或他们需要去哪里...任何人?



我试图避免使用文件夹在服务器/ qs1和/ qs2和/ qs3上(以及成千上万)如果我可以捕获传入的URI并让它转到同一页面进行解析和处理。这些qs文件夹适用于个人用户 - 我宁愿使用db调用从一个页面提供自定义内容,而不是在单个用户文件夹中通过服务器复制数百次主文件。如果这是有道理的。或者也许我今天早上已经开始研究这些东西了。

This is probably easy but I'm too deep in other code to figure this out.

I need all incoming page requests to open to the same page UNLESS it's a postback. In other words: .domainname/qs1 and .domainname/qs2 and domainname/qs3 should all open .domainname/something.aspx but NOT if it's a postback. Incoming requests only. From there, I would parse the URI and send additional parameters to db calls or where they need to go ... anyone?

I'm trying to avoid having folders on the server /qs1 and /qs2 and /qs3 (and on into the thousands) if I can just trap the incoming URI and have it go to the same page to be parsed and processed. These qs folders are for individual users - I would rather serve the custom content from one page using db calls rather than have a main file duplicated hundreds of times over the server in individual user folders. If that makes sense. Or maybe I've been up working on this stuff too long already this morning.

推荐答案

这篇关于拦截URL并将所有内容重定向到一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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