Solutions for pseudo-static PHP programs !! I am talking about solving the problem in the PHP program, not modifying the APACHE server !!, The program must have an entry file and then process the url. the. htaccess file PHPcodeRewriteEngineOnRewriteBase/RewriteRule solves the pseudo-static PHP program !!
I am talking about the solution in the PHP program, instead of modifying the APACHE server,
Solution !!
------ Solution --------------------
The program must have an entry file and then process the url.
------ Solution --------------------
. Htaccess file
PHP code
RewriteEngine OnRewriteBase/RewriteRule ^ ([\ d000000000000.html $ news. php? Id = $1 # What is news. php? Change id = 123 to 123.html.
------ Solution --------------------
If you have to do this in a PHP program, you can only use 404 to redirect.
First, you must allow these static addresses to access the 404 page.
Then, use PHP on the 404 page to obtain the URL address and output different content based on the address.
------ Solution --------------------
PATH_INFO
------ Solution --------------------
Discussion
PATH_INFO
------ Solution --------------------
Currently, apache supports pathinfo by default.
------ Solution --------------------
Http://blog.csdn.net/aendo/article/details/5467417
This is ASP, PHP does not need to do so, there is a better way
------ Solution --------------------
Positive solution on the second floor. The PHP method does not know what the landlord wants.
------ Solution --------------------
You must enter the url. this is the first step. parsing the url is the second step and processing is the third step.
Step 1 enter abc.html
The second step is to convert html to php.
You can skip to 404
If you really don't want to change the url
After passing JS to realize it, abc.html is used.
You can use ajax to secretly run php and bring the data in it.
------ Solution --------------------
Pseudo-static ~
------ Solution --------------------
Pseudo-static ~
------ Solution --------------------
It's not easy to learn !!!