Home > Backend Development > PHP Tutorial > wordpress permalink principle

wordpress permalink principle

WBOY
Release: 2016-08-04 09:20:38
Original
1148 people have browsed it

I am more interested in the principle of wordpress permalink, such as the following url:

<code>/?p=1 #最丑陋,最直接,就是根据id去查

/2016/07/14/xxx

/category/xxx

/article/xxx

/article
</code>
Copy after login
Copy after login

These are legal URLs and can be understood by WordPress. How do you do this and make them dynamic?

Regular?

Reply content:

I am more interested in the principle of wordpress permalink, such as the following url:

<code>/?p=1 #最丑陋,最直接,就是根据id去查

/2016/07/14/xxx

/category/xxx

/article/xxx

/article
</code>
Copy after login
Copy after login

These are legal URLs and can be understood by WordPress. How do you do this and make them dynamic?

Regular?

Those things that appear to be paths to you, such as /2016/07/14/xxx, are actually converted into index.php parameters through Apache’s RewriteRule. It will be easy to understand later, since index.php After receiving these parameters, it can search for articles in the database and display them according to the corresponding rules.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template