For this you have to create a module. Inside your module create routes.xml
in location app/code/Vendor/Module/etc/frontend/routes.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route frontName="reset" id="reset">
<module name="Vendor_Module"/>
</route>
</router>
</config>
Create layout at location app/code/Vendor/Module/view/frontend/layout/reset_emppass_index.xml
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<container name="categories1" htmlTag="div" htmlClass="categories">
<block class="Vendor\Module\Block\YourAnyBlock" name="myblock" template="Vendor_Module::index/index.phtml"/>
</container>
</referenceContainer>
</body>
</page>
Next create a controller index and an action index at app/code/Vendor/Module/Controller/Emppass/Index.php
<?php
namespace Vendor\Module\Controller\Emppass;
class Index extends \Magento\Framework\App\Action\Action
{
protected $resultPageFactory;
/**
* Constructor
*
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
*/
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
}
/**
* Execute view action
*
* @return \Magento\Framework\Controller\ResultInterface
*/
public function execute()
{
return $this->resultPageFactory->create();
}
}
Finally create a template at app/code/Vendor/Module/view/frontend/templates/index.phtml
Hello this is my template. I can do anything inside this file.