我正在使用HTTP資源的URL作爲資源的唯一標識符(意外)。如何查找除特定查詢字符串以外的匹配網址?
這些都是不同的:
http://localhost/Docs/SomeDocument?group=33&checksafety=true
http://localhost/Docs/SomeDocument?group=11&checksafety=true
http://localhost/Docs/SomeDocument?group=11&checksafety=false
不過,我不應該區分資源的第三查詢參數(在服務器端,它就會從數據庫中相同的數據)。
這些是相同的(組和checksafety參數都相同):
http://localhost/Docs/SomeDocument?group=11&checksafety=false&rendergroup=A
http://localhost/Docs/SomeDocument?group=11&checksafety=false&rendergroup=B
http://localhost/Docs/SomeDocument?rendergroup=C&group=11&checksafety=false
是一個正則表達式合適嗎?
有沒有更好的方法?
我使用的是C#,.NET 3.5和ASP.NET。
的http://本地主機/文件/ SomeDocum ent?group = 33&checksafety = true和 http:// localhost/Docs/SomeDocument?checksafety = true&group = 33是不同的? – 2009-08-04 15:08:07
@samuelcarrijo - 不,他們是一樣的。 – 2009-08-04 16:27:54