rawurl

ASP.NET: Get *real* raw URL

给你一囗甜甜゛ 提交于 2020-01-01 09:33:09
问题 In ASP.NET, is there any way to get the real raw URL? For example, if a user browse to "http://example.com/mypage.aspx/%2F", I would like to be able to get "http://example.com/mypage.aspx/%2F" rather than "http://example.com/mypage.aspx//". I would of course like a clean way to do it, but I can live with a hacky approach using reflection or accessing obscure properties. At the moment, I try to use the uri in the Authorization-header (which works), but I cannot rely on that always being there.

replace entites in rawurlencode i.e. < > "

狂风中的少年 提交于 2019-12-10 15:28:42
问题 I have the following code <a href="snippet:add?code=<?php echo rawurlencode($snippet->snippet_content); ?>Save snippet</a> where '$snippet = <a rel="nofollow" href="http://digg.com/submit?phase=2&url=<?php the_permalink(); ?>" title="Submit this post to Digg">Digg this!</a>' How could I get rawurlencode to replace "&lt"; to a "<"? Many thanks in advance rob updated using <?php echo rawurlencode(html_entity_decode($snippet->snippet_content)); ?> as suggested by the posters below, thankyou