Home > CMS Tutorial > PHPCMS > How phpcms generates static

How phpcms generates static

藏色散人
Release: 2019-12-27 10:19:10
Original
2680 people have browsed it

How phpcms generates static

How does phpcms generate static?

As we all know, search engines do not support dynamic pages very well, so in order to better include them in the rankings, we need to generate static pages from phpcms. So how should we generate static pages? How to generate static pages What are the rules?

Static is divided into "pure static" and "pseudo-static". Today we will talk about how to generate pure static for the entire site.

First, we need to set up static html generation. Let's enter In the phpcms V9 background, find the category column at: Content-Manage Column-Add Column (or manage the column, click the corresponding column to modify) and then click the second tab of the settings "Generate HTML Settings", select the column to generate html, and select " Yes", the content page generates html. Select "Yes"

Click to confirm the submission, and then update the column cache. For release management: batch update column pages and batch update content pages.

We can also customize url rules and url address optimization operations to make your url more in line with your aesthetics

Before customizing url rules, we need to briefly understand PC The html generation principle of v9:

The static page directory rules generated by Phpcms are generated according to URL rules. The static page content is phpcms\templates\default generated by the ob_clean front-end template file. Static page debugging: modify the static page , regenerate the static page and see the effect. You can also call the front-end control/index.php?m=openservice&c=index& a=openservice to modify the front-end template and then generate it.

As long as there are links to static pages, the files must be synchronized in time to prevent dead links and data errors.

In this regard, we can customize the url generation rules in the background extended url rule management. The specific location is: Backstage-Extended-url rule management

The default column generation rules are:

{$categorydir}{$catdir}/index.html|{$categorydir}{$catdir}/{$page}.html
Copy after login

When specifically generating html, it will be displayed as news/cmsyou/1000.html

We can change its generation rules according to our own needs to achieve the results we want

We recommend changing the article generation rules to:

{$categorydir}{$catdir}/{$id}.html|{$categorydir}{$catdir}/{$id}_{$page}.html
Copy after login

This change will not only facilitate management but also facilitate SEO operations.

Have you learned how to generate static in simple phpcms?

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of How phpcms generates static. For more information, please follow other related articles on the PHP Chinese website!

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