943,915 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 2760
  • ASP.NET RSS
Jun 7th, 2008
0

How to rewrite url

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ramganesh is offline Offline
2 posts
since Jun 2008
Jun 7th, 2008
0

Re: How to rewrite url

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 .
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
FaridMasood is offline Offline
59 posts
since Mar 2007
Jun 7th, 2008
0

Re: How to rewrite url

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ramganesh is offline Offline
2 posts
since Jun 2008
Jun 7th, 2008
0

Re: How to rewrite url

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
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
FaridMasood is offline Offline
59 posts
since Mar 2007
Jun 7th, 2008
0

Re: How to rewrite url

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.
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
a496761 is offline Offline
62 posts
since Feb 2008
Jun 7th, 2008
1

Re: How to rewrite url

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.
vb.net Syntax (Toggle Plain Text)
  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.
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Client server Messaging Application
Next Thread in ASP.NET Forum Timeline: problem with uploading several images with the same name.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC