HTML Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherHTML Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
The Web Buyer's Guide is your best source for white papers on a wide range of IT products and services. This Week's Featured White Papers: Help Simplify Virtualization by IBM
  #1  
Old March 26th, 2008, 02:08 PM
<%=joe%>'s Avatar
<%=joe%> <%=joe%> is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: NJ
Posts: 8 <%=joe%> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 29 m 21 sec
Reputation Power: 0
Send a message via AIM to <%=joe%>
IIS 301 redirect question dynamic url's

Greetings all. I have searched through the forums and I feel I need to ask...

what is the best way to implement 301's for a site whose structure is like this...

shopdisplayproducts.asp?
hid=1&
id=18&
cat=Audio+Preamps&prodid=1053&
product=C46



This site has hundreds of pages (or rather hundreds of products that are being loaded by the dynamic url)

Is there a method for me to grab the values for each of the querystring elements above?

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new-url.com/"
%>

Many Thanks

Reply With Quote
  #2  
Old March 26th, 2008, 02:19 PM
Highland's Avatar
Highland Highland is offline
Extremely Googled
SEO Chat Novice (500 - 999 posts)
 
Join Date: Dec 2004
Posts: 546 Highland User rank is Corporal (100 - 500 Reputation Level)Highland User rank is Corporal (100 - 500 Reputation Level)Highland User rank is Corporal (100 - 500 Reputation Level)Highland User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 Days 1 h 26 m 47 sec
Reputation Power: 5
A 301 is a special header. So ASP and .NET both have the ability to do 301s. I'm not all that familiar with .NET but a quick search shows you can grab the query string via Request.QueryString

Reply With Quote
  #3  
Old March 26th, 2008, 02:33 PM
FogHorn's Avatar
FogHorn FogHorn is offline
hctibselgoogtonmai
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Apr 2004
Posts: 1,465 FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 8 h 35 m 48 sec
Reputation Power: 15
The BEST way is to install a rewrite component and then just write the rules similar to how would in .htaccess on an Apache server.

I've used ISAPI Rewrite from Helicontech for years and have never had an issue with the software or the support.
__________________
hctibselgoogtonmai

Reply With Quote
  #4  
Old March 26th, 2008, 03:17 PM
<%=joe%>'s Avatar
<%=joe%> <%=joe%> is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: NJ
Posts: 8 <%=joe%> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 29 m 21 sec
Reputation Power: 0
Send a message via AIM to <%=joe%>
I've used ISAPI as well (they are good). You are saying... install ISAPI on the new server and then search for rule at heliontech support?

You think that would be easier than trying to write my own asp code to grab the current queryString varialbles?

Quote:
Originally Posted by FogHorn
The BEST way is to install a rewrite component and then just write the rules similar to how would in .htaccess on an Apache server.

I've used ISAPI Rewrite from Helicontech for years and have never had an issue with the software or the support.

Reply With Quote
  #5  
Old March 26th, 2008, 03:46 PM
FogHorn's Avatar
FogHorn FogHorn is offline
hctibselgoogtonmai
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Apr 2004
Posts: 1,465 FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 8 h 35 m 48 sec
Reputation Power: 15
Quote:
Originally Posted by <%=joe%>
I've used ISAPI as well (they are good). You are saying... install ISAPI on the new server and then search for rule at heliontech support?

You think that would be easier than trying to write my own asp code to grab the current queryString varialbles?

I can help with the rules if you have version two, if you have version three it's the same as mod rewrite. As far as the redirects go you should be able to set up a single rule that will redirect all url's that contain the same patterns of variables.

Regarding the other option, perhaps I'm misunderstanding. Do you intend to do all of these redirects in IIS?

Reply With Quote
  #6  
Old March 28th, 2008, 07:54 AM
<%=joe%>'s Avatar
<%=joe%> <%=joe%> is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: NJ
Posts: 8 <%=joe%> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 29 m 21 sec
Reputation Power: 0
Send a message via AIM to <%=joe%>
My thoughts were to either

A. put these files on my new server (I'm moving to a new environment) with traditional asp 301 redirect code in each

or

B. put the redirect code in IIS.

I had ISAPI with my previous company so anythnig I get now would be the latest from HelionTech.

My thoughts were that I could create some type of select case code directly into the 301 code for that pages that need it, like this...

current url...
shopdisplayproducts.asp?product=MC501

new url...
products/MC501.asp

'code below
dim pid
pid = request.querystring("product")

Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new-url.com/products/"&pid&".asp"


Your thoughts? (thanks)

Reply With Quote
  #7  
Old March 28th, 2008, 04:26 PM
FogHorn's Avatar
FogHorn FogHorn is offline
hctibselgoogtonmai
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Apr 2004
Posts: 1,465 FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level)FogHorn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 8 h 35 m 48 sec
Reputation Power: 15
OK, was scratching my head for a minute thinking that you were redirecting pages on the same site, and if so, none of it makes sense. Looking back at your first post, sorry, it looks like you're sending everything to a new domain.

In that case your reasoning makes sense: request the query string and pass that into the on page redirect to the corresponding ID on the new site. What doesn't make sense is how you're going to display the rewritten url on the new site without a rewrite component installed.

Seems that you might also do it in IIS, just Google IIS 301 site variables if you were going to keep the variables.

As far as the version of ISAPI_Rewrite, lot's of support available for .htaccess on the web as in version three but if you're used to writing your rules in the httpd.ini file it will take some adjusting.

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherHTML Coding > IIS 301 redirect question dynamic url's


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway