Iis7 uses the urlwrite module to implement second-level domain name rewriting for wildcard DNS ?? How to implement it? The requirement for second-level domain name rewriting is & nbsp; 1. www. site. comccc is rewritten to www.site.comindex.phpccc2.ccc.site.com to ccc. site. comindex. phpccc I wrote the following 1 implementation, but there is a problem with 2. I don't know how to use XML iis7 to rewrite the second-level domain name of pan resolution using the url write module ??
How to implement it?
Second-level domain name rewriting
Required:
1.www.site.com/cccare all rewritten to www.site.com/index.php/ccc
2.ccc.site.com rewrite to ccc.site.com/index.php/ccc
I wrote 1 below, but 2 has a problem. I don't know what to do for help
XML code
------ Solution --------------------
When ccc.site.com is rewritten to index. php/ccc, the index. php page is displayed. what's wrong?
------ Solution --------------------
It seems that the regular expression is not correct. it is better to change it to this, but you can also write it like this:
------ Solution --------------------
How is the ccc column under index. php? Don't understand...
Is index. php dynamically display the ccc column based on parameters? Or is there the index. php/ccc directory on the website?
------ Solution --------------------
If you disable rewrite temporarily, enter ccc.site.com/index.php/ccc.
What is the same effect?
------ Solution --------------------
If you are sure that the entered address is the same as the rewritten address, both are: ccc.site.com/index.php/ccc
However, if you see different results, it may be a problem with the php program. it may directly read the original URL before rewriting.
However, this is unlikely. Are you sure you can see different effects by directly pasting the rewritten address to the address bar?
------ Solution --------------------
Your wildcard parsing rules and the rules for www.site.com seem very confusing. you should first remove "Imported Rule 1" and try again.
------ Solution --------------------
Url rewriting does not change the content in the browser's address bar.
After reading it for a long time, I didn't see what your requirements are. I only saw PATH_INFO.