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

Pseudo-static setting method of the whole phpcms station

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you the pseudo-static setting method of the phpcms station. I hope you will gain a lot after reading this article. Let's discuss it together.

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 、

AllowOverride none

Change to

AllowOverride all

3. 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", pay attention to the naming to add "", get the .htaccess file, and then write the following code to save.

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.

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.

After reading this article, I believe you have a certain understanding of the pseudo-static setting method of the phpcms station, want to know more about it, welcome to follow the industry information channel, thank you for your reading!

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