Find pseudo-static PHP program Solution!

Source: Internet
Author: User
Find pseudo-static PHP program Solution!!
I'm talking about solving the PHP program, not modifying the APACHE server,

Solving!!

------Solution--------------------
The program must have a portal file and then process the URL
------Solution--------------------
. htaccess file

PHP Code
Rewriteengine onrewritebase/rewriterule ^ ([\d+). html$ news.php?id=$1# This is changing the news.php?id=123 to 123.html.
------Solution--------------------
If you have to be in the PHP program, you can only use 404 jump

First you have to let these static addresses access the 404 pages to

Then 404 pages in PHP to get the URL address, depending on the address of the different output different content
------Solution--------------------
Path_info
------Solution--------------------
discuss

Path_info

------Solution--------------------
Apache now supports pathinfo by default.
------Solution--------------------
http://blog.csdn.net/aendo/article/details/5467417
This is ASP, PHP is not necessary to do so, there is a better way
------Solution--------------------
2 floor positive solution. PHP method does not know what the landlord wants a method.
------Solution--------------------
URL you have to lose, this is the first step, parsing the URL is two steps, processing is the third step
The first step you have to enter a abc.html
The second step, you turn the corner of the ink to PHP for the HTML
You will be helpless to jump to 404

If you really don't want to change the URL,
Through JS to achieve, access to the abc.html
You can sneak a mother through Ajax to get the data and fill it in.

------Solution--------------------
Pseudo-Static never done ~
------Solution--------------------
Pseudo-Static never done ~
------Solution--------------------
Not too know to pass by study!!!
  • 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.