2min

Agent access setup

General If the agent manager is uploaded to the root directory of the website, but it's not accessible from the Web, try one of the following solutions.

Web-server configs (Laravel) By default, Laravel includes a configuration file for apache - ".htaccess", which is located at the root of the site. In this file 2 blocks are highlighted by comments "White listed folders" and "Block all PHP files, except index", you need to add the agent name to the exceptions in these blocks. Each agent has its own unique name, so you should put the name of the generated agent for your site. For example: In file: .htaccess Edit these blocks (add an exclusion line for the script):

RewriteCond %{REQUEST_FILENAME} ![your_agent_name].am.php For example: ## ## White listed folders ## RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} !/.well-known/* RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.* RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.* RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.* RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.* RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.* RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.* RewriteCond %{REQUEST_FILENAME} !H4F1YUkZstmjizl7RrHSe2ZQU64vL1rhkXRjd7KqH9Ug4uSVMAPuHZlEElOep7Jh.am.php RewriteRule !^index.php index.php [L,NC] ## ## Block all PHP files, except index ## RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} \.php$ RewriteCond %{REQUEST_FILENAME} !H4F1YUkZstmjizl7RrHSe2ZQU64vL1rhkXRjd7KqH9Ug4uSVMAPuHZlEElOep7Jh.am.php RewriteRule !^index.php index.php [L,NC] Done!

Setup routes for PHP Frameworks (Laravel) If you do not have access to editing the web server configuration files, or for other reasons this setting did not help, then specify a route to access the agent installation script. For example (Laravel): In file: /modules/system/routes.php Add: App::before(function ($request) { /* * Combine JavaScript and StyleSheet assets */ Route::any('combine/{file}', 'System\Classes\SystemController@combine'); $wtagentmanager = 'H4F1YUkZstmjizl7RrHSe2ZQU64vL1rhkXRjd7KqH9Ug4uSVMAPuHZlEElOep7Jh.am.php'; Route::match(['get', 'post'], $wtagentmanager, function () { if ( file_exists($wtagentmanager) ) { include_once($wtagentmanager); } }); });

Done!



Updated 14 Jun 2022
Did this page help?
Yes
No