javascript - Take the user name from the URL and redirect with a query string with that user name -


I want to execute a jquery script which takes any name after the slash "/" in the domain address and The default user with a query string with the user's username For example, if a user types Mydomain.com/username, I want to redirect the page to mydomain.com/default.aspx?name=username.

How can I complete this? Thanks

Solution

I added the following code to the global code.

  Secure void Application_BeginRequest (Object Sender, EventArgs e) {Uri Yuri Address = New Uri (Request URL. AbsoluteURI); If (uriAdress.seagment! = Null and Yuri address.Segment.Langtie> 1 & amp; amp; String.ISNLLCTI (YuriAdder. [1]) {String User Name = Yuri Address Response.Redirect ("default .aspx? Name = "+ Segment User Name);}}  

URL here There is a complete solution against rewriting.

Rewrite the text from there .. Blocking an incoming web request and requesting a different resource. Rune: The process of directing. When reconstructing the URL, the URL is usually requested is checked and, depending on its value, the request is sent to a different URL. The URL automatically links to the blog directory when the website reorganizes the web pages of a specified directory or article and accesses a web page from an article or directory via the URL Is moved. It is by the URL revision.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - Can't add JTree to JPanel of a JInternalFrame -

java - @PluginTarget(Node.class) not registering as neo4j plugin -