ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - 301 Redirect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

301 Redirect

 Post Reply Post Reply Page  <12
Author
Message Reverse Sort Order
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 02-June-2010 at 4:19pm
Never mind... Figured it out... Should have used:
Response.AddHeader "Location", "/shop/pc/OtherPage.asp" instead of the Respnse.Redirect

Time for more coffee!! Embarrassed
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 02-June-2010 at 3:26pm
Afraid it's not working for me :(

I tried adding this at the top of the  page:

Dim CatNumber
CatNumber= lcase(Request.ServerVariables("Query_String"))
if CatNumber="idcategory=224" then
Response.Status="301 Moved Permanently"
Response.Redirect "/shop/pc/TheOtherPage.asp"
Response.End()
else
if CatNumber="idcategory=11" then
Response.Status="301 Moved Permanently"
Response.Redirect "/shop/pc/OtherPage2.asp"
Response.End()
end if
end if


While the Re-Direct goes fine, the headr status is not returning 301, but 302!
Any suggestions?


Edited by worldofrugs - 02-June-2010 at 4:14pm
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 22-December-2009 at 11:45pm
That's simple Curt.  Just place a bit of code in your header.asp
 
Here is the code that allows you to grab the current page name.
 
Here is the code for an ASP 301 redirect.
 
You need to wrap the 301 redirect with an IF statement that tests for which page you are on.  When you find that you are on the page you want to redirect from, pull the trigger and blast it.
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 22-December-2009 at 11:12pm
What would be the best way to redirect this asp page:
http://www.avalanche-ranch.com/rusticlighting/pc/viewCategories.asp?idCategory=3

to this page

http://www.avalanche-ranch.com/rusticlighting/pc/viewCategories.asp?idCategory=4

I want to use a 301 redirect.  I have looked online for this.  I don't see a solution.  Perhaps the isapi rewrite?  Looks pretty complicated.  I have just stopped using that category...

Thanks
Curt
Avalanche Ranch Light Company

Edited by avalight - 22-December-2009 at 11:19pm
Curt
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.