php - How to use web.config [IIS] to shorten a URL GET data -


I have tried to look around, but my query can not be found at all. I do not have enough knowledge to do this, but basically I want to shorten this URL:

  http://example.com/register/?ref=Liam  

to

  http://example.com/register/ref/Liam  

using IIS web.config

You can use this web.config:

  & Lt; Rule name = "rule1n" stop processing = "true" & gt; & Lt; Mail url = "^ register /(.+)/(.*)$" /> & Lt; Action type = "rewrite" url = "/ register /? {R: 1} = {R: 2}" /> & Lt; / Rules & gt;  

Now if you open example.com/register/ref/r , then you example.com/register?ref=r


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -