473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

rewriting URLs?

I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!
Jun 21 '06 #1
6 1001
In 2.0 theres a new handler, with a section in web.config to list your
re-mappings called urlMappings.

http://msdn2.microsoft.com/en-us/library/ms228302.aspx

Regards

John Timney (MVP)
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:Of**************@TK2MSFTNGP04.phx.gbl...
I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!

Jun 21 '06 #2
Smokey,
http://www.codeproject.com/aspnet/URLRewriter.asp
hope that helps
Patrick

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:Of**************@TK2MSFTNGP04.phx.gbl...
I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!

Jun 21 '06 #3
doesnt help much with dynamic sites though does it? this is pretty much a
static rewrite it seems...
"John Timney (MVP)" <x_****@timney.eclipse.co.uk> wrote in message
news:Ft********************@eclipse.net.uk...
In 2.0 theres a new handler, with a section in web.config to list your
re-mappings called urlMappings.

http://msdn2.microsoft.com/en-us/library/ms228302.aspx

Regards

John Timney (MVP)
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:Of**************@TK2MSFTNGP04.phx.gbl...
I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!


Jun 21 '06 #4
Yes, your not the first person to mention that as an issue, and people have
alrady started providing workarounds.

Perhaps this is more up your street
http://www.urlrewriting.net/Config.a...ookieSupport=1

or this:
http://www.willasrari.com/blog/appli...sax/00043.aspx

--
Regards

John Timney (MVP)
"Smokey Grindle" <no********@dontspam.net> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
doesnt help much with dynamic sites though does it? this is pretty much a
static rewrite it seems...
"John Timney (MVP)" <x_****@timney.eclipse.co.uk> wrote in message
news:Ft********************@eclipse.net.uk...
In 2.0 theres a new handler, with a section in web.config to list your
re-mappings called urlMappings.

http://msdn2.microsoft.com/en-us/library/ms228302.aspx

Regards

John Timney (MVP)
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:Of**************@TK2MSFTNGP04.phx.gbl...
I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!



Jun 21 '06 #5
thanks!

"John Timney (MVP)" <x_****@timney.eclipse.co.uk> wrote in message
news:IL********************@eclipse.net.uk...
Yes, your not the first person to mention that as an issue, and people
have alrady started providing workarounds.

Perhaps this is more up your street
http://www.urlrewriting.net/Config.a...ookieSupport=1

or this:
http://www.willasrari.com/blog/appli...sax/00043.aspx

--
Regards

John Timney (MVP)
"Smokey Grindle" <no********@dontspam.net> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
doesnt help much with dynamic sites though does it? this is pretty much a
static rewrite it seems...
"John Timney (MVP)" <x_****@timney.eclipse.co.uk> wrote in message
news:Ft********************@eclipse.net.uk...
In 2.0 theres a new handler, with a section in web.config to list your
re-mappings called urlMappings.

http://msdn2.microsoft.com/en-us/library/ms228302.aspx

Regards

John Timney (MVP)
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:Of**************@TK2MSFTNGP04.phx.gbl...
I use to know how to do this in .net 1.1, but not sure in 2.0 (cant even
remember 1.1 its been 2yrs since I did ASP.net last) but say I have this
site that is dynamic

http://localhost/content.aspx?page=23

how can I make that translate into this

http://localhost/Content/23

that virtual path that translates into an actual page... thanks!



Jun 21 '06 #6
In article <Ft********************@eclipse.net.uk>, "John Timney (MVP)"
<x_****@timney.eclipse.co.uk> writes
In 2.0 theres a new handler, with a section in web.config to list your
re-mappings called urlMappings.

http://msdn2.microsoft.com/en-us/library/ms228302.aspx


Do you know if this can be used when the URL entered doesn't contain
..aspx? I have a client who wants to advertise URLs like...

http://www.domain.com/software

and have it map to the real ASP.NET page. Basically, his audience is
really not techno-savvy and he is bothered by the .aspx endings as they
are harder to read. I know I could just bung the various bits of content
in folders, but I have other reasons why I don't want to do that. This
urlMappings handler looked just the ticket, but only if it can be used
with an URL like I showed. I have a suspicion that this URL won't get
passed to the ASP.NET engine, so the mapping will never get done.

Any comments? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Jun 27 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Gordan | last post by:
Hi, here's my problem. On my pages I have URL souch as these "page.php?id=2&subpage=3&param=65". For security reasons I would like to add another parameter. It would be created like this...
6
by: Jon Maz | last post by:
Hi All, I am experimenting with URL Rewriting using the techniques outlined by Scott Mitchell in his article "URL Rewriting in ASP.NET"...
7
by: go | last post by:
Can someone please tell me what URL rewriting is? I don't understand . . . a client is asking me to rewrite his URLs.
3
by: Michael Appelmans | last post by:
I'm trying to use a rule based URL rewrite application which uses HttpApplication.RewritePath. I keep getting "rsource not found" error in application when running on shared web host although the...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
2
by: KMA | last post by:
My site has dynamicaly generated pages. Most of the URLs are false, and I used to trap them in a generic 404 page, which stripped off a unique part of the URL, built the page then sent that back to...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to...
0
by: Moinak Bhattacharya | last post by:
Hi, We are using URL rewriting to display user friendly URL in the address bar for the pages requested. For this, physical pages are mapped to the logical urls by regexp in HTTPModules. But the...
8
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm having trouble with URL rewriting using HttpApplication.Context.RewritePath in a web application I've created. Everything works, but the links (css, images) in the pages break when...
3
by: Toni | last post by:
Does anyone have a recommended method of rewriting URLs with classic ASP? For example, if the browser shows the Friendly URL www.mydomain.com/blue_widget my app will show the following Content...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.