Home > front end >  The inside of the web.config configuration who understand? <match the url=". * "/> t
The inside of the web.config configuration who understand? <match the url=". * "/> t

Time:03-19



Website with domain matching,
Expect such a jump, I offer a few examples:
http://test1.domainA.com/s.html? C=1234 jump to:
http://test1.domainB.com/s.html? C=1234

http://aa34234.domainA.com/s.html? C=556677 jump to:
http://aa34234.domainB.com/s.html? C=556677

The secondary domain name is uncertain, the back of the parameter is also uncertain,

I did expression: ^ (. *?) DomainA.com (. *) $
Let it jump to: {R: 1} {2} R: domainB.com

{R: 1} said in parentheses matching group 1
{R: 1} said in parentheses matching group 2


 
<? The XML version="1.0" encoding="utf-8"?>











Code above after repeated tests and have no effect, as if the url can only matching parameter form, without reason

CodePudding user response:

Has perfect solution,
 
<? The XML version="1.0" encoding="utf-8"?>











The along while not fix yesterday. Today, with the help of a the elder brothers solved a few minutes, and will only a little bit of PHP, this elder brothers don't know, it's no use asp iis, occasionally let me help to write a small tool, he is with what solution?
In general because he USES Google, I use baidu,,,


He searched to: https://stackoverflow.com/questions/5394632/how-to-set-up-url-rewrite-on-iis7-so-that-multiple-subdomains-redirect-to-the-co
https://serverfault.com/questions/250549/how-to-http-redirect-while-maintaining-subdomain-using-iis-7


This is the key information, use the code of a foreigner after basic perfect solution, just after the jump parameters to pass over,

The inside of the & lt; The action type="Redirect" url="http://. {1} C: newdomain.com {2} C: { the PATH_INFO } "appendQueryString=" false "/& gt; The red of the PATH_INFO don't know if you have noticed that the code USES the following parameters will be lost, also it is easy to understand, this is the path, so I think I should have said parameters such as variable, and this should be a set of environment variable capital letters, I want to find parameters of environment variables, should be like at the beginning of the REQUEST? I embarrassed bother the elder brothers, the somebody else all go to have a meal, later have to depend on oneself, I think that there should be an article specifically introduces the capital variables, and the page should contain the PATH_INFO and I are the representation of the parameters of the unknown variable names, so I in baidu keyword "the PATH_INFO will" search, how also can not find the information I need, is irrelevant information,


Can I use the elder brothers to me later to find information on Google tool at https://hideu.app/? F=d3DaA, download and open the Google, detection unexpectedly can only be used for a period of time, but is enough for me, also with the keyword "the PATH_INFO will" search, the results are quite different,

When I saw the IIS Server Variables know where my problem is solved and the IIS Server Variables,

Points to open a look, sure enough the list of clear and tidy, I soon found, what I want is {HTTP_URL} , is not I like the beginning of a began to REQUEST, change to a test, is very perfect,


Different someone will ask, why did you start in the baidu search the IIS Server Variables or search the IIS environment Variables? You this hindsight, who would immediately think of? Maybe I search skills need to be improve, anyway Google very understand me, can see the first front page I want results, as for baidu, do not add comments, you see by yourself, foreigner technology BBS useful information, later can ramble more, also can improve English level, but access speed is slow,

  •  Tags:  
  • ASP
  • Related