I have created a script file in root folder of the magento as like below
<?php
error_reporting(E_ALL);
use \Magento\Framework\App\Bootstrap;
require __DIR__ . '../../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$resource = $obj->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$response = $_REQUEST;
/* echo '<pre>';
print_r($response);die;*/
$unique_code= $response['unique_code'];
$this->_redirect("custom/services/custompage", ['unique_code' =>
$unique_code]);
In above code I am trying to redirect to my custom controller, with parameter,
but the above code is not working. Can anyone tell me how can we redirect to controller with parameter.
Thanks!!