In short, feel the site's UrlIt is a very awkward thing to have parameters on the one hand, it is easy to inject, on the other hand, parameter transmission is very easy to divulge some useful information.
And this article is mainly aimed at the Web site URL display pseudo static, so abandoned the direct generation of static page of the trouble, and can be very good protection of user privacy, while the site security will also have a certain performance improvement.
The main operating procedures are as follows:
First of all, we need a Microsoft urlrewriter component, here's the download address I'll provide under:
http://download.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/ Msdnurlrewriting.msi
Then you create a new Web site and Add the DLL file to your project by adding a reference.
I built the site page is a simple front-office press release system, the page is as follows:
And then there's the list page:
Then the above is titled "3333333" Detailed information display page, the specific display page is:
So for such a page, we have to do pseudo static, first of all, we need to configure webconfig
As shown in the following illustration:
One thing to be aware of is the<LookFor></LookFor>And<SendTO></SendTO>node, written toLookForIn the nodeUrlThe path is published externallyUrlPath, whileSendTOIn the node url path is Iis D Back with the numbers are handed to Newslistaspx With the parameter return resolution, and the node two part is as long as is similar to the letter DD Newsdetails.aspx with parameter return processing; and Node three is Html request page to Aspx request returned.
You also need to add the following modules below the <HttpHandlers> node :
These settings are good, but our IIS default is not able to directly parse the HTML suffix (if not added), then you need to configure IIS, the configuration path is as follows:
Open itiis-Right click on the website—"Property—"Switch to the Home Directory tab"-" click "Configure" button -" switch to the "Map" tab -" "Double click" . Aspx", in the pop-up window, copy the string after "executable" -" click "Add" -" Enter a copy of the executable path --- à remove " Check if the file exists "tick box, the last application can be."
After the configuration is complete, on your site, as long as there is similar
<a href = ' newslist.aspx?id=<% #Eval ( "id" "%> ' ><%#< Span lang= "en-us" Times New Roman '; mso-font-kerning:0pt; Mso-no-proof:yes ">eval ( Name) %> </ a ,
Modified into
<a href= d<% #Eval ("ID") %>. html ' ><%#Eval (' Name ') % ></a>
and put
<a href = ' newsdetails.aspx? newsid=<% #Eval ( "id " "%> ' ><%#< Span lang= "en-us" Times New Roman '; mso-font-kerning:0pt; Mso-no-proof:yes ">eval ( Title) %> </ a "
Modified into
<a href= ' dd<% #Eval (' ID ') %>. html ' ><%#Eval ("Title") %></a>
Finally , you can use IIS to access it, Setup is complete