Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > rewriting URLs?

Reply
Thread Tools

rewriting URLs?

 
 
Smokey Grindle
Guest
Posts: n/a
 
      06-21-2006
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!


 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      06-21-2006
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" <> wrote in message
news:...
>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!
>



 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      06-21-2006
Smokey,
http://www.codeproject.com/aspnet/URLRewriter.asp
hope that helps
Patrick

"Smokey Grindle" <> wrote in message
news:...
>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!
>



 
Reply With Quote
 
Smokey Grindle
Guest
Posts: n/a
 
      06-21-2006
doesnt help much with dynamic sites though does it? this is pretty much a
static rewrite it seems...


"John Timney (MVP)" <> wrote in message
news:...
> 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" <> wrote in message
> news:...
>>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!
>>

>
>



 
Reply With Quote
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      06-21-2006
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" <> wrote in message
news:%...
> doesnt help much with dynamic sites though does it? this is pretty much a
> static rewrite it seems...
>
>
> "John Timney (MVP)" <> wrote in message
> news:...
>> 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" <> wrote in message
>> news:...
>>>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!
>>>

>>
>>

>
>



 
Reply With Quote
 
Smokey Grindle
Guest
Posts: n/a
 
      06-21-2006
thanks!

"John Timney (MVP)" <> wrote in message
news:...
> 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" <> wrote in message
> news:%...
>> doesnt help much with dynamic sites though does it? this is pretty much a
>> static rewrite it seems...
>>
>>
>> "John Timney (MVP)" <> wrote in message
>> news:...
>>> 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" <> wrote in message
>>> news:...
>>>>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!
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Alan Silver
Guest
Posts: n/a
 
      06-27-2006
In article <>, "John Timney (MVP)"
<> 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)
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL rewriting on the Cisco Content Switch CSS 11503 j208@gmx.net Cisco 1 10-02-2005 06:35 PM
URL rewriting with SCA -=_ Antani _=- Cisco 0 09-16-2004 08:45 AM
how to get VS.NET to stop rewriting my code? Max ASP .Net 11 01-29-2004 01:32 PM
httpmodules and url rewriting with no extension Thedotnetteer ASP .Net 2 11-27-2003 09:49 PM
URL rewriting Juha Borenius ASP .Net 2 08-15-2003 01:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57