Which of the following experts will explain the principle of wordpress custom url? I have observed that it is not implemented through. htaccess.
But how does it define the url at will, but the access is normal ??
An example is recommended.
Reply to discussion (solution)
I guess this will happen.
For example
Localhost/list. php/gonggao.html
When the program runs, execute list. php. The following gonggao.html is intercepted and used as an alias to query the id records in the database,
Then, what content is called?
This means that there is a route at the entrance to analyze the url, split it according to the slash, and then go to the database to check the alias, where to go
PATH_INFO
You don't even know this, do you?
PATH_INFO
You don't even know this, do you?
I have never used wordpress, but only rely on Path_info?
Contains any client-provided pathname information trailing the actual script filename but preceding the query string, if available. For instance, if the current script was accessed via the URL http://www.example.com/php/path_info.php/some/stuff?foo=bar, then $_SERVER['PATH_INFO'] would contain /some/stuff.
After trying rewrite, it seems that path_info is not available?
Besides, yii has a lot of code on the url.
I guess this will happen.
For example
Localhost/list. php/gonggao.html
When the program runs, execute list. php. The following gonggao.html is intercepted and used as an alias to query the id records in the database,
Then, what content is called?
This means that there is a route at the entrance to analyze the url, split it according to the slash, and then go to the database to check the alias, where to go
That is, it feels simple.
Follow
Thank you. I have implemented the function.
Http://demo.momocms.com/contents/jianjie.html