PDA

View Full Version : Redirecting Friendly Urls


Webs
10-31-2006, 03:58 AM
Hello Forum,

I have just moved over a corporate website from their old host to DASP. My problem is with redirecting friendly URLS.

On the old host, the website http://www.cbetech.com (http://www.cbetech.com) would allow setting up a URL such as http://www.cbetech.com/Nov17 which would resolve to http://www.cbetech.com/NewsEvents/EventDetails.asp?EventID=96

This is not working on DASP. I created a help ticket and was told that this needed to be done programatically (?). Something about a file in the document root that would contain the redirects for all the friendly URLS?

Has anyone faced this and have a solution for how I can solve this? The client has mailed out postcards with friendly URLS on it and they are all returning "Page not Found" as we speak.

Thanks,
Webs

bluebeard96
10-31-2006, 04:48 AM
For a detailed method to rewrite the urls, check out this thread - http://community.discountasp.net/default.aspx?f=5&m=9333


For a quick fix, you can create a subfolder in your site called "Nov17" (since the server will attempt to load "http://www.cbetech.com/Nov17/default.asp"). Inside the Nov17 folder create a "default.asp" file with an response.redirect in the ASP file.


<% response.redirect "NewsEvents/EventDetails.asp?EventID=96" %>
Do that for each "friendly" URL you have.

bruce
10-31-2006, 07:18 AM
If you do not have a lot of these redirect, it is not worth implementing URLRewriting because it can be quite complicated.

Using the manual redirect method should work just fine!

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)