ASISG
Gy - php framework/CMS | Documentation | 404 page and protection of the admin panel (opening the admin panel using a unique link)
404 page and protection of the admin panel (opening the admin panel using a unique link)
In the settings file gy\config\gy_config.php
, you can set the secretKeyAuthorizationAdminPanel
parameter with a unique value, a set of characters (except for the $ # symbols).
If this parameter is set, then all admin pages (existing) will give 404 errors, if you do not open them with a parameter in the link secretKeyAdminPanel
equal to the value from the settings files secretKeyAuthorizationAdminPanel
.
(This means opening the login page /gy/admin/
)
(After entering the authorization with the correct secretKeyAdminPanel
key and logging in, you will no longer need to add a key to open other admin pages)
The path to the 404 page can be specified in the settings file ( gy\config\gy_config.php
) in the urlPage404
parameter. If no 404 page is specified, the default will be /gy/404.php
.
If the secretKeyAuthorizationAdminPanel
parameter is not specified, then the admin panel opens as always (404 page won't show).
It is recommended to make a 404 page for the entire site.
It is done by configuring the server and telling the server which page to send.
You need to make one 404 for the entire site and admin panel,
i.e. register in gy\config\gy_config.php
in the urlPage404
parameter the same page with the html code of the 404 page.
The purpose of this. To hide the information that the site is running on the gy framework. Authorization to the admin panel will open using the same link but with the given key, and if you do not know the key, then the answer is 404 (the same should be 404 as throughout the site)