将QueryString转换为常规Url

编程入门 行业动态 更新时间:2024-10-22 07:45:14
本文介绍了将QueryString转换为常规Url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我看到一篇文章描述了如何将查询字符串转换为 没有查询字符串的Url并返回页面。 例如,此请求: http:// www .mywebsite / products.as ... ry =主板 变成这样的: www.mywebsite/motherboard.aspx 我需要这样做或类似的东西。问题是,我不能把这个文章放在我的手上。它本来可以是十几本b b b杂志,几十个网站或几十个时事通讯。我真的 希望我把它加了书签。如果有人能指出我的任何资源 描述这种技术我会非常感激。 问候, David Taylor

解决方案

您是否可以对如何使这个 工作更具描述性?显然你可以做一些像 response.redirect(request.queryString(" category")&" .aspx") 但我觉得你想要多做一些事情 复杂。 -D David C. Taylor <峰; dt ***** @ harc.edu>在留言中写道 news:d4 ************************** @ posting.google.c om ...

我看到一篇文章描述了如何将查询字符串转换为没有查询字符串的URL并返回页面。 例如,此请求: http://www.mywebsite。 com / products.as ... ry =主板 变成这样的: www.mywebsite/motherboard.aspx 我需要这样做或类似的东西。问题是,我不能把手放在那篇文章上。它本来可以是十几种杂志,几十个网站或几十种新闻通讯。我真的希望我已经给它添加了书签。如果有人能指出我描述这种技术的任何资源,我将非常感激。 问候, David Taylor

您是否可以更加描述一下如何使这个 工作?显然你可以做一些像 response.redirect(request.queryString(" category")&" .aspx") 但我觉得你想要多做一些事情 复杂。 -D David C. Taylor <峰; dt ***** @ harc.edu>在留言中写道 news:d4 ************************** @ posting.google.c om ...

我看到一篇文章描述了如何将查询字符串转换为没有查询字符串的URL并返回页面。 例如,此请求: http://www.mywebsite。 com / products.as ... ry =主板 变成这样的: www.mywebsite/motherboard.aspx 我需要这样做或类似的东西。问题是,我不能把手放在那篇文章上。它本来可以是十几种杂志,几十个网站或几十种新闻通讯。我真的希望我已经给它添加了书签。如果有人能指出我描述这种技术的任何资源,我将非常感激。 问候, David Taylor

您可以使用request.RawURL()方法返回整个查询,然后使用 一些字符串函数来退出所有内容到? ;。 筹码 " David C. Taylor" <峰; dt ***** @ harc.edu>在留言中写道 news:d4 ************************** @ posting.google.c om ...

我看到一篇文章描述了如何将查询字符串转换为没有查询字符串的URL并返回页面。 例如,此请求: http://www.mywebsite。 com / products.as ... ry =主板 变成这样的: www.mywebsite/motherboard.aspx 我需要这样做或类似的东西。问题是,我不能把手放在那篇文章上。它本来可以是十几种杂志,几十个网站或几十种新闻通讯。我真的希望我已经给它添加了书签。如果有人能指出我描述这种技术的任何资源,我将非常感激。 问候, David Taylor

I saw an article that described how to convert the query string into an Url without a query string and return the page. For example, this request: www.mywebsite/products.as...ry=motherboard becomes something like this: www.mywebsite/motherboard.aspx I need to do that or something like it. The problem is, I cannot put my hands on that article. It could have been anywhere from a dozen magazines, dozens of websites, or dozens of newsletters. I really wish I had bookmarked it. If anyone can point me to any resources describing this technique I would be highly appreciative. Regards, David Taylor

解决方案

Could you be a little more descriptive about how you are trying to get this to work? Obviously you could do something like response.redirect(request.queryString("category") & ".aspx") but I have a feeling you are trying to do something a little more complicated. -D "David C. Taylor" <dt*****@harc.edu> wrote in message news:d4**************************@posting.google.c om...

I saw an article that described how to convert the query string into an Url without a query string and return the page. For example, this request: www.mywebsite/products.as...ry=motherboard becomes something like this: www.mywebsite/motherboard.aspx I need to do that or something like it. The problem is, I cannot put my hands on that article. It could have been anywhere from a dozen magazines, dozens of websites, or dozens of newsletters. I really wish I had bookmarked it. If anyone can point me to any resources describing this technique I would be highly appreciative. Regards, David Taylor

Could you be a little more descriptive about how you are trying to get this to work? Obviously you could do something like response.redirect(request.queryString("category") & ".aspx") but I have a feeling you are trying to do something a little more complicated. -D "David C. Taylor" <dt*****@harc.edu> wrote in message news:d4**************************@posting.google.c om...

I saw an article that described how to convert the query string into an Url without a query string and return the page. For example, this request: www.mywebsite/products.as...ry=motherboard becomes something like this: www.mywebsite/motherboard.aspx I need to do that or something like it. The problem is, I cannot put my hands on that article. It could have been anywhere from a dozen magazines, dozens of websites, or dozens of newsletters. I really wish I had bookmarked it. If anyone can point me to any resources describing this technique I would be highly appreciative. Regards, David Taylor

You can use the request.RawURL() method to return the entire query, then use some string functions to back out everything up to the "?". Chip "David C. Taylor" <dt*****@harc.edu> wrote in message news:d4**************************@posting.google.c om...

I saw an article that described how to convert the query string into an Url without a query string and return the page. For example, this request: www.mywebsite/products.as...ry=motherboard becomes something like this: www.mywebsite/motherboard.aspx I need to do that or something like it. The problem is, I cannot put my hands on that article. It could have been anywhere from a dozen magazines, dozens of websites, or dozens of newsletters. I really wish I had bookmarked it. If anyone can point me to any resources describing this technique I would be highly appreciative. Regards, David Taylor

更多推荐

将QueryString转换为常规Url

本文发布于:2023-11-01 12:36:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549353.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   常规   QueryString   Url

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!