Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The setting method of pseudo-static in Phpcms V9

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Phpcms V9 pseudo-static setting method of the whole station? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

How does phpcms pseudo-static pages?

Pseudo-static setting method of Phpcms V9

Phpcms V9 can be said to be the strongest custom function in cms programs, and can be set in both static and pseudo-static aspects. Here we share the PHPCMS V9 pseudo-static setting method. I hope you can use it!

Why is it pseudo-static? Let's not talk about it here, you know! On the one hand, there is no need to generate static files after updating and modifying, on the other hand, for SEO!

The access rules are as follows:

List- {$catid}-{$page} .htmlcontent-{$catid}-{$id}-{$page} .html

You can go to extension-> URL rule management, setting.

Note that the following methods apply only to Apache servers. If IIS servers, use httpd.ini instead of .htaccess.

The method of setting up httpd.ini is slightly different from .htaccess, because I don't have IIS locally, so I don't write these rules.

Check whether the server supports rewrite

For example, the method to enable rewrite locally is as follows

Apache profile httpd.conf

1 、 LoadModule rewrite_module modules/mod_rewrite.so

Comment out the "#" of this sentence.

2. Change AllowOverride none to AllowOverride all

Restart the apache server.

Second, prepare the .htaccess file (how to set up. Htaccess)

If windows, you can use notepad, save the option to save as, ".htaccess", and note that you should add "" when naming.

Get the .htaccess file, and then write the following code to save it.

RewriteEngine OnRewriteRule ^ (. *) content- ([0-9] +)-([0-9] +)-([0-9] +)-([0-9] +)\ .html$ $1/index\ .php\? 3&page=$4RewriteRule = $3&page=$4RewriteRule ^ (. *) show- ([0-9] +)-([0-9] +)-([0-9] +). Html$ $1/index\ .php\? ([0-9] +)-([0-9] +) .html$ $1/index\ .php\? m=content&c=index&a=lists&catid=$2&page=$3

The above are the .htaccess rules, grammar can be explained in detail under Baidu.

If you want to test locally, such as 127.0.0.1/my2400, because it is not accessed by the root directory, rewrite the above code as follows (with an extra / my2400):

RewriteEngine OnRewriteRule ^ (. *) content- ([0-9] +)-([0-9] +)-([0-9] +)-([0-9] +)\ .html$ $1/my2400/index\ .php\? show- showcases catidflowers indexation 2cards = $3&page=$4RewriteRule ^ (. *) show- ([0-9] +)-([0-9] +)-([0-9] +). Html$ $1/my2400/index\ .php\? *) list- ([0-9] +)-([0-9] +) .html$ $1/my2400/index\ .php\? m=content&c=index&a=lists&catid=$2&page=$3

Third, PHPCMS V9 sets up the classification column in the background.

Location: content-> manage columns-> add columns

Pay attention to setting the second tab, "generate HTML Settings"

Column page URL rules: list-1-2-1.html

Content page URL rule: content-1-2-1.html

Fourth, update URL in batches to complete pseudo-static settings.

Thank you for reading! After reading the above, do you have a general understanding of the pseudo-static setting method of Phpcms V9? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report