Home  >  Article  >  Backend Development  >  wordpress permalink principle

wordpress permalink principle

WBOY
WBOYOriginal
2016-08-04 09:20:381125browse

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>

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>

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.

Statement:
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