RE: shorten the page address
- From: c676228 <betty@xxxxxxxxxxxxxxxx>
- Date: Thu, 30 Apr 2009 13:52:32 -0700
Steven,
By using 404 page, will it hurt our web page because of search engine
indexing?
I am not sure what 200 Ok will do in response.
Could you explain a bit?
We are so afraid of being punished since we have hundreds of agents.
with redirect from
mydomain.com/wmXXXXXX
to mydomain.com/what/wmedhigh.asp?XXXXXX
with XXXXXX will be replaced with different agent number
Here is my version of customized 404 page:
qstr = Request.ServerVariables("QUERY_STRING")
strPage = Mid(qstr , InStrRev(qstr , "/") + 1)
Fst2strPage=Left(strPage, 2)
If Fst2strPage="wm" Then
PONumber=Right(StrPage, Len(strPage)-2)
If isNumeric(PONumber) and Len(PONUmber)<7 Then
Response.Status="200 OK"
Response.Redirect("http://www.mydomain.com/what/wmedhigh.asp?"&Ponumber)
'Server.Transfer("http://www.mydomain.com/what/wmedhigh.asp")
Else
Response.Redirect("http://www.mydomain.com/404Page.htm")
End If
Else
Response.Redirect("http://www.mydomain.com/404Page.htm")
End If
--
Betty
""Steven Cheng"" wrote:
Hi Betty,.
The article you mentioned is describing a method for url rewriting in
classic asp page. And that method take advantage of the IIS 404 error page.
When the IIS receive a request which doesn't have a valid server document
mapping to it, it will generate a 404 "not found" error, and here we can
configure the IIS to use a custom 404 error page. That means whenever the
client request a non-existing file/page, our custom error page will be
executed. So we can use an asp page as the 404 error page and do our URL
redirection logic there. For creating a custom 404 error page, you can
have a look at the following articles:
#Creating a Custom 404 Error Page
http://www.4guysfromrolla.com/webtech/061499-1.shtml
#How to Create a Custom 404 Error Page in Microsoft IIS
http://ask.enquiro.com/2008/how-to-create-a-custom-404-error-page-in-microso
ft-iis/
So for the following redirect case:
http://www.mydomain.com/param1name/param1value/param2name/param2value/page.a
sp is actuall a url which doesn't even exists on the IIS server, when the
IIS server recieve this request, it will generate 404 error and call our
custom 404 error page(could be an asp page), and in that error page we can
redirect the request to other page(such as the following one) according to
the querystring parameters.
http://www.mydomain.com/page.asp?param1name=param1value
If you still have anything unclear, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?YzY3NjIyOA==?= <betty@xxxxxxxxxxxxxxxx><uLWlXHxxJHA.664@xxxxxxxxxxxxxxxxxxxxxx>
References: <B0C78B68-40F9-420C-AF80-EF23AFDA03D7@xxxxxxxxxxxxx>
Subject: RE: shorten the page address
Date: Tue, 28 Apr 2009 15:42:02 -0700
Steven,http://www.mydomain.com/param1name/param1value/param2name/param2value/page.a
Nice to hear from you again.
I am reading this page:
http://asp.johnavis.com/blog/default.asp?id=19
i don't really understand the following part:
/*****************
Use the following script in your custom error page:
strQuery = Request.ServerVariables("QUERY_STRING")
strPage = Mid(strQuery, InStrRev(strQuery, "/") + 1)
'betty--the above two statements should be
URL=Request.ServerVariables("URL")
strPage = Mid(URL, InStrRev(URL, "/") + 1) 'or did I misunderstand him?
' Change page.asp and page2.asp and add duplicate lines for
' each page you want redirection
If strPage = "page.asp" Then
Response.Status="200 OK"
Server.Transfer("/page.asp")
ElseIf strPage = "page2.asp" Then
Response.Status="200 OK"
Server.Transfer("/page2.asp")
Else '
Put your normal error page here
End If
URL=Request.ServerVariables("URL")
strPage = Mid(URL, InStrRev(URL, "/") + 1)
*****************
In his Funciton RequestQS, is he trying to demo this
sp page will be
redirected tomean
http://www.mydomain.com/page.asp?param1name=param1value
I guess I missed something. In order to redirect in this way, does that
we need to create a pageurl.
param1name/param1value/param2name/param2value/page.asp page, right?
If we have many this kind of pages, we need to create all actual pages?
--
Betty
""Steven Cheng"" wrote:
Hi Betty,
I think what you need is the URL-rewriting approach which redirect some
user/search engine friendly url to the underlying/actual complicated
methods:For IIS hosted http web application, you can use custom isapi filter to
perform url-rewriting.
#Product overview
http://www.isapirewrite.com/
#ISAPI Rewrite 2.0--URL Rewriting for Windows Server IIS
http://www.seoconsultants.com/windows/isapi/
Also, here are some article discussing on classic ASP url-rewriting
and
http://asp.johnavis.com/blog/default.asp?id=19
http://www.webmasterworld.com/microsoft_asp_net/3740259.htm
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
Pleasesuggestions about how we can improve the support we provide to you.
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
--------------------
From: =?Utf-8?B?YzY3NjIyOA==?= <betty@xxxxxxxxxxxxxxxx>
Subject: shorten the page address
Date: Fri, 24 Apr 2009 13:01:02 -0700
Hi all,
If the web address is really long, i.e.
mydomain.com/what/productName/myprogram.asp?ComplicatedStringValue
and I wan to shorten it. I can create a shorter web address
like this:
mydomain.com/myProgram1.asp?ComplicatedStringValue
in this new page, I just redirect this page to
mydomain.com/what/productName/myprogram.asp?ComplicatedStringValue
Are there any other ways doing that?
Thanks,
--
Betty
- Prev by Date: RE: shorten the page address
- Next by Date: RE: recordset.addNew
- Previous by thread: RE: shorten the page address
- Next by thread: RE: recordset.addNew
- Index(es):
Relevant Pages
|