PHP: about pseudo-static! New PHP users have been entangled in pseudo-static resources over the past few days. I have found a lot of information on the internet in this regard, and I have mentioned using ApacheRewrite. htaccess can be implemented. I have tried a few programs, but it can be implemented. but what's puzzled is that if a website does not consider pseudo-static at the beginning of construction, after the website is built, can I use the above method to set it? There are many link-related issues on the page. how can we solve (non-pseudo-static links) PHP's pseudo-static problems!
New PHP users have been entangled in pseudo-static resources over the past few days. I have found a lot of information on the internet in this regard, and I have said that Apache Rewrite is used. htaccess can be implemented. I have tried a few programs, but it can be implemented. but what's puzzled is that if a website does not consider pseudo-static at the beginning of construction, after the website is built, can I use the above method to set it? There are many problems related to links on the page (non-pseudo-static links), such as passing parameters on a paging program, previous pages, and next pages, what should I do with links in the program, modify them one by one, format them, and there is no clue ..... What is the complete process of pseudo-static website implementation? Do you want to modify the program?
------ Solution --------------------
It is better to have a function/class method to control the link format.
------ Solution --------------------
Here is an example. RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ /? Jourindex. php? Id = (. *) & path = (. *) & page = (. *) $ default_$$$2.html? Page = $3
------ Solution --------------------
This means to control the relationship between your parameters and the pseudo-static address you want to write !! Generation should be regular!
You can refer to the third floor!
------ Solution --------------------
You must modify your program to adapt to pseudo-static
------ Solution --------------------
Mark it, and look back.
------ Solution --------------------
The output link address changes.
For example, you used to be news. php? Id = 1
The pseudo-static address is/news/1.html.
The address in the template must use/news/1.html. Previously news. php? Id = 1
Generally, you can choose whether to enable pseudo-static state for websites. Therefore, you can determine whether the pseudo-static state is enabled and then determine what hyperlinks are output.