Solved

How to pass variables in a clean seo string  for asp pages

Posted on 2011-09-29
8
227 Views
Last Modified: 2012-05-12
I am stuck with ASP for a variety of reasons.
I have a need to use clean urls's for my pages like

www.mysite.com/products/support
www.mysite.com/products/tripods

things of this nature, right now my strings passed look like so:

www.mysite.com/products/support.asp
www.mysite.com/products/products.asp?cat=5&subcat=2&prod=4587

is there a way to clean up the URLs?
How could I still pass the information along?

I know I can set a default document for the first example but I want to be able to get to other pages in that particular directory the same way.
0
Comment
Question by:EGormly
  • 3
  • 3
  • 2
8 Comments
 
LVL 11

Expert Comment

by:G_H
ID: 36817367
OK, the real question here is which IIS are you using?

If you are using IIS7 then this is going to be easy, otherwise quite a bit harder...

Can you please let us know.

GH
0
 

Author Comment

by:EGormly
ID: 36817374
II6  :(
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 36817470
you'll need a url rewriter that can turn seo-friendly url's into usable url's for your application. Have a look at www.isapirewrite.com, I've used them a lot before and have had no complaints.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 11

Expert Comment

by:G_H
ID: 36817477
There are two ways, "404" and "helicon"

I prefer IIS7, then 404 then Helicon (but that's just me)

OK, you are going to need to setup a custom 404 page, which will make a decision, based on the requested URL.

Setup IIS to "Execute" "/404.asp" when a page is not found.

In your 404.asp file you will need to breakdown the URL that was previously collected. To see what is going on put this in your 404.asp:
 
response.write Request.QueryString

Open in new window

This should show you what is sent over. Should be something like 404;http://www.mysite.com/products/products.asp?cat=5&subcat=2&prod=4587 (From my not-very-good memory).

You can then analise this string, and show what ever you like...

GH
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 36817505
@G_H

won't that hurt your seo rankings though? If google goes to your page and gets a 404 upon crawling it, its never going to see the custom page as the server returned the 404 code back to the crawler before the custom error page id displayed....
0
 

Author Comment

by:EGormly
ID: 36817594
I do not care about SEO rankings, I only care that it conforms to our new designers requests.

I already do that with 404, I totally thin't think of using it for everything..

thanks
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 36817634
then why create SEO friendly URL's?

I would think twice about using this technique, not only is it a poor technique seo-wise, but its also poor site structure. Do you really want to be adding code everytime you have a new querystring parameter to account for?

just my .02 cents...
0
 
LVL 11

Expert Comment

by:G_H
ID: 36817637
@The Big Daddy:

That depends on what you do next. Providing you follow this up with:

 
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", DestinationURL

Open in new window


... everything is fine. But I wanted to see how much help the asked needed, before IU went there... :-)

GH
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question