User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 427,382 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,034 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 549 | Replies: 5
Reply
Join Date: Jun 2008
Posts: 2
Reputation: Ramganesh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ramganesh Ramganesh is offline Offline
Newbie Poster

How to rewrite url

  #1  
Jun 7th, 2008
Hi

I wish to Rewrite Url

www.mysite.com/demo.aspx/1

instead of www.mysite.com/demo.aspx?id=1

i tried a lot with the below

http://www.qwerksoft.com/products/ii...e/download.asp

yet i got clear way

can anybody guide me or give me a new idea to do this stuff
( I wish to Rewrite Url

www.mysite.com/demo.aspx/1

instead of www.mysite.com/demo.aspx?id=1 )
by
Ram
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Posts: 50
Reputation: FaridMasood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
FaridMasood's Avatar
FaridMasood FaridMasood is offline Offline
Junior Poster in Training

Re: How to rewrite url

  #2  
Jun 7th, 2008
i dont understand why you are intrested to do so, yet
www.mysite.com/demo.aspx?id=1

is quite safe method

can you explain your problem in detail may be i can help you .
Reply With Quote  
Join Date: Jun 2008
Posts: 2
Reputation: Ramganesh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ramganesh Ramganesh is offline Offline
Newbie Poster

Re: How to rewrite url

  #3  
Jun 7th, 2008
i just don't want to show special characters like ? & % in url (or address bar)

when we use query string we should use this special characters

how can i eliminate this characters by rewritting url or any other way
Reply With Quote  
Join Date: Mar 2007
Posts: 50
Reputation: FaridMasood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
FaridMasood's Avatar
FaridMasood FaridMasood is offline Offline
Junior Poster in Training

Re: How to rewrite url

  #4  
Jun 7th, 2008
Ok i understand you can go through from this link

http://msdn.microsoft.com/en-us/library/ms972974.aspx

this contains all the neccessary information and security reason you are talking about
hope this will help you

Regards,

Farid ud din Masood
Reply With Quote  
Join Date: Feb 2008
Posts: 51
Reputation: a496761 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
a496761 a496761 is offline Offline
Junior Poster in Training

Re: How to rewrite url

  #5  
Jun 7th, 2008
I'd suggest implementing a 3rd party component. We use http://urlrewriter.net/ quite a bit and I've been very impressed with it. If you decide to go this route and end up having any issues with the setup, let us know.
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: How to rewrite url

  #6  
Jun 7th, 2008
It's not difficult in asp.net to use the ASP.NET built in methods to do url rewriting.

Also, if you wish to stray away from this method, just add a check at the beginning of each page.
  1. Dim idSplit = request.serverVariables("SCRIPT_NAME").split("/")
  2. Dim id = idSplit(idSplit.length - 1)
  3. Dim page = idSplit(idSplit.length - 2)
  4.  
  5. If page = "demo.aspx" And Not id Is Nothing Then
  6. 'there's a querystring.
  7. End If
This is not a very effective way, but if it is small and minimal people are using it, it can be an easy solution.
I answer pm's.
I answer questions.
I answer quickly.
I answer.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 4:10 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC