In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of phpcms configuration 404, which is very detailed and has a certain reference value. Interested friends must read it!
PHPCMS is a website management software. The software adopts modular development and supports a variety of classification methods, and it is convenient to realize the design, development and maintenance of personalized websites. It supports a large number of program combinations, can easily achieve website platform migration, and can widely meet the needs of websites of all sizes.
How to set the 404 error page in a phpcms v9 system:
1. In the root directory of the website, create a page404.php file with the following contents:
Or:
Or:
2. Define 404 pages in the function library.
Modify phpcms/libs/functions/global.fnc.php, last position, insert:
Function page404 () {header ($_ SERVER ['SERVER_PROTOCOL']. "404 Not Found", true, 404); require (' page404.php'); exit ();}
3. Find the lists and show methods in phpcms/module/content/index.php, modify and insert:
Show method:
If (! $catid | |! $id) page404 () if (! isset ($CATEGORYS [$catid]) | | $CATEGORYS [$catid] ['type']! = 0) page404 () if (! $r | | $r [' status']! = 99) page404 ()
Lists method:
If (! isset ($CATEGORYS [$catid])) page404 ()
With this modification, the status code 404 will be returned when the above situation is encountered.
The above is all the contents of the method of phpcms configuration 404, thank you for reading! Hope to share the content to help you, more related knowledge, 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.