By default, the URL path of the phpcmsv9 article is dynamic, and a lot of strings are not only ugly, but not conducive to search engine crawling, now I want to optimize the previous many URL characters into short and relatively easy URLs to be crawled by search engines. By default, the URL path of phpcms v9 is dynamic, for example
http://localhost/phpcms/index.php?m=content&c=index&a=show&catid=6&id=1
A large number of strings are not only ugly, but are not conducive to search engine crawling.
Now I want to optimize the previous many URL characters to be brief and relatively easy to crawl by search engines:
http://localhost/phpcms/news/1.html
The following three steps are involved.
Custom url rules
First, you must establish your own URL rules and understand some definitions and variable meanings. First, go to URL rule management: "extension"-"RUL rule management"-"manage RUL rules" and add rules ,:
The following is the definition of the RUL rule variable. Understanding it can help us define the rule well:
1. {$ parentdir} {$ catdir} --- meaning: The Directory Name of the current topic;
2. {$ catid} ---- meaning: column ID;
3. {$ year} ---- meaning: year;
4. {$ month} -- meaning: month;
5. {$ day} ----- meaning: day;
Modify "generate HTML Settings"
Find content> content Settings> management topic> and open the page:
Note that the English directory above is changed to "news ". Open "generate HTML Settings ",
In the content page, select "catdir/custom 2.html" from the URL rule drop-down box, which is the previously customized URL rule. Set other options as shown in the figure below.
Update Cache
The URL setting rules have been completed before, but do not forget to update the cache.