虚荣网址 [英] Vanity URLs

查看:66
本文介绍了虚荣网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试创建虚荣网址(我认为这就是他们所谓的),

直接链接到某个项目在我的网站上列出了

页面。目前,网址设置类似于

以下内容:

http://www.mydomain.com/productinfo.asp?prodID=00000


我正在尝试配置它们是这样的:

http:// www .mydomain.com / products / 00000

我想要这样做的原因是我们打印了一个纸质目录,而且我将支付
喜欢在那里列出链接。

我尝试创建一个名为products的文件夹,并将其配置为

使用以下内容重定向到重定向文件:

http://www.mydomain.com/redirect.asp?prodID=$S


重定向文件包含以下代码的效果:

<%

Response.Redirect(" productinfo.asp?prodID ="& _

替换(Request.Que) rystring(" prodID")," /",""))

%>


这在我的本地测试中效果很好服务器。问题是我的托管

提供程序不会配置重定向的文件夹。那就是说,

有没有办法以另一种方式做到这一点?我认为可能的一个是

配置你的404错误页面来拉取​​网址并转发到列表

页面基于该网址中的某个项目。有没有人这样做过?我很高兴得到帮助。


谢谢,


克里斯

Hello,

I am trying to create vanity URLs (I think that''s what they are called) that
link directly to an item''s listing
page on my site. Currently, the urls are set up something like the
following:

http://www.mydomain.com/productinfo.asp?prodID=00000

I am trying to configure them to be something like this:

http://www.mydomain.com/products/00000

The reason why I want to do this is that we print a paper directory and I
would like to list the links in there.
I have tried creating a folder called products, and configuring it to
redirect to a redirect file using the following:
http://www.mydomain.com/redirect.asp?prodID=$S

The redirect file contained something to the effect of the following code:
<%
Response.Redirect("productinfo.asp?prodID=" &_
Replace(Request.Querystring("prodID"),"/",""))
%>

This worked great on my local testing server. The problem is that my hosting
provider would not configure the folder for the redirect. That said, is
there any way to do this another way? I think the one possible is to
configure your 404 Error page to pull the url and forward to the listing
page based on some item in that url. Has anyone done this? I
appreciate the help.

Thanks,

Chris

推荐答案

S


重定向文件包含以下代码的效果:

< ;%

Response.Redirect(" productinfo.asp?prodID ="& _

替换(Request.Querystring(" prodID")," / ",""))

%>


这在我的本地测试服务器上运行良好。问题是我的托管

提供程序不会配置重定向的文件夹。那就是说,

有没有办法以另一种方式做到这一点?我认为可能的一个是

配置你的404错误页面来拉取​​网址并转发到列表

页面基于该网址中的某个项目。有没有人这样做过?我很高兴得到帮助。


谢谢,


克里斯

S

The redirect file contained something to the effect of the following code:
<%
Response.Redirect("productinfo.asp?prodID=" &_
Replace(Request.Querystring("prodID"),"/",""))
%>

This worked great on my local testing server. The problem is that my hosting
provider would not configure the folder for the redirect. That said, is
there any way to do this another way? I think the one possible is to
configure your 404 Error page to pull the url and forward to the listing
page based on some item in that url. Has anyone done this? I
appreciate the help.

Thanks,

Chris


http://www.asp101。 com / articles / wayne / extendingnames /

" Chris Guimbellot" < CG ********* @ FORGETSPAM.hifranchise.com>在消息中写道

news:%2 **************** @ tk2msftngp13.phx.gbl ...
http://www.asp101.com/articles/wayne/extendingnames/
"Chris Guimbellot" <cg*********@FORGETSPAM.hifranchise.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
你好,

我正在尝试创建虚荣URL(我认为这就是他们所谓的)
直接链接到我网站上的项目列表
页面。目前,网址设置如下:

http://www.mydomain.com/productinfo.asp?prodID=00000

我正在尝试将它们配置为这样:<

http://www.mydomain.com/products/00000

我想要这样做的原因是我们打印了一个纸质目录,我想在那里列出链接。
我试过创建一个名为products的文件夹,并使用以下命令将其配置为重定向到重定向文件:
http://www.mydomain.com/redirect.asp?prodID=
Hello,

I am trying to create vanity URLs (I think that''s what they are called) that link directly to an item''s listing
page on my site. Currently, the urls are set up something like the
following:

http://www.mydomain.com/productinfo.asp?prodID=00000

I am trying to configure them to be something like this:

http://www.mydomain.com/products/00000

The reason why I want to do this is that we print a paper directory and I
would like to list the links in there.
I have tried creating a folder called products, and configuring it to
redirect to a redirect file using the following:
http://www.mydomain.com/redirect.asp?prodID=


S

重定向文件包含以下代码的效果:
<%
Response.Redirect(" productinfo.asp?prodID =" & _
替换(Request.Querystring(" prodID" ),/,和")
%>

这在我的本地测试服务器上运行良好。问题是我的
托管服务提供商不会为重定向配置文件夹。那就是说,有没有办法以另一种方式做到这一点?我认为可能的一种方法是将您的404错误页面配置为拉取网址并根据该网址中的某个项目转发到列表页面。有没有人这样做过?我很感激帮助。

谢谢,

Chris
S

The redirect file contained something to the effect of the following code:
<%
Response.Redirect("productinfo.asp?prodID=" &_
Replace(Request.Querystring("prodID"),"/",""))
%>

This worked great on my local testing server. The problem is that my hosting provider would not configure the folder for the redirect. That said, is
there any way to do this another way? I think the one possible is to
configure your 404 Error page to pull the url and forward to the listing
page based on some item in that url. Has anyone done this? I
appreciate the help.

Thanks,

Chris



这篇关于虚荣网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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