Share a piece of code show.asp?id=26 become a show/?26 form _ Application Tips

Source: Internet
Author: User
Found that a lot of ASP's system in the call to the article if not generate static, the output is similar
Http://www.xxx.com/show.asp?id=26 in this format.

If you can change http://www.xxx.com/show/?26 this format, feel good stopgap a lot, of course, for the support of pseudo static space
can also be set to HTTP://WWW.XXX.COM/SHOW/26 it is said that Yang can increase the probability of search engine included.

The code is as follows:
First create a show directory, create a index.asp file, is the system default file
Then put the previous if it is show.asp?id=26, show this file first need to get ID general
Id=request. QueryString ("id")
And so on. Get ID instead, get the number on the back, use the following code.
id = LCase (Trim (Request.ServerVariables ("query_string"))

The other linked databases are the same way

Set rs = Server.CreateObject ("ADODB.") Recordset ")
Rs. Open "SELECT * from blog where id=" &id, conn,3,3

We can try, hehe.

Give a demo:

Http://www.aubaby.cn/shop/?26
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.