Optimization settings phpcms V9 URL rules

Source: Internet
Author: User

By default, Phpcms V9 's article URL path is dynamic, such as

http://localhost/phpcms/index.php?m=content&c=index&a=show&catid=6&id=1

Now I'm going to optimize the previous bunch of URL characters to be short and relatively easy for the search engine to crawl the URLs:

Http://localhost/phpcms/news/1.html

There are three steps to achieve:

Custom URL Rules

The first thing to do is to create your own URL rules to understand some definitions and variable meanings. First go to URL Rule management: "Extend"-"Rul Rule Management"-"Manage Rul rules" and add rules:

1, {$parentdir} {$catdir}---Meaning: The current column directory name;

2, {$catid}----meaning: Column ID number;

3, {$year}----meaning: year;

4, {$month}--meaning: month;

5, {$day}-----meaning: day;


Modify the "Generate HTML Settings"

Find: Content > Content Related Settings > Admin section, find the page:


"Generate HTML Settings" above the dot


The default "column generation HTML" and "content page Generation HTML" radio buttons are "No", instead "yes"

You have already completed the rules for setting the URL, but don't forget to update the cache once you've set it up!

Optimization settings phpcms V9 URL rules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.