WordPress before the time often involved in pseudo static, that is, mod_rewrite this noun, and then the beginning of the time is not very clear, only know is used to convert the address for HTML included, today finally found a better article, sent up with you to study together, What is called pseudo static mod_rewrite,
The following is a brief introduction to Mod_rewrite's knowledge:
First you have to turn on Apache's mod_rewrite function.
In the Apache directory apache\conf this folder httpd.conf file with Notepad open edit, find the following sentence:
#LoadModule Rewrite_module modules/mod_rewrite.so
Remove the # number from the front, and turn it into:
LoadModule Rewrite_module modules/mod_rewrite.so
Then find the following sentence in the same file:
AllowOverride None
Change it to read:
AllowOverride All
Then close and save the file. As a result, Apache's mod_rewrite function is turned on, very simple.
Below, I want to implement such a URL with mod_rewrite:
Http://xxx.com/0725.html
Http://xxx.com/0726.html
Http://xxx.com/0727.html
...
The link above means to show what happened in the history of July 25, something like that. This looks very beautiful, neat, seemingly generated HTML. However, their address is actually:
http://xxx.com/index.php?today=0725
http://xxx.com/index.php?today=0726
http://xxx.com/index.php?today=0727
...
Now I just want to implement the index.php?today= as static. Here's the code:
1..htaccess file
Rewriteengine on
Rewritebase/
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
Rewriterule ^ ([0-9]+) \.html$/index.php?today=$1
Bold word Here I explain, the other in this format, I do not understand the specific now.
[0-9] means that the parameter can only be 0~9 these numbers, if you want to include any characters, change to:
Rewriterule ^ (. +) \.html$/index.php?today=$1
Here [0-9] was replaced. , this. Represents any character