I created a module with following admin routes.xml
/app/code/UV/Bestellung/etc/adminhtml/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="admin">
<route id="custom" frontName="custom">
<module name="UV_Bestellung" />
</route>
</router>
</config>
This is the controller:
app/code/UV/Bestellung/Adminhtml/Controller/Index
<?php
namespace UV\Bestellung\Controller\Adminhtml\Index;
use Magento\Framework\App\Action\Action;
use Magento\Framework\Controller\ResultFactory;
class Index extends Action
{
public function execute()
{
echo 'Test';
/*
$page = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
return $page;
*/
}
}
When I call
www.mysite.com/admin/custom
it redirects me to the Dashboard. Can someone tell me what is wrong or what the correct URL is?
Thanks! :-)