Pseudo-static setting method of the whole phpcms station
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!