I have created a routing URL like
login.compnay_login_form:
path: '/u/{company_name}/login'
defaults:
_controller: '\Drupal\login\Controller\LoginController::login_form'
_title: 'Login'
requirements:
_permission: 'access content
This works with http://example.com/u/testcompany/login
But I want the URL like http://example.com/testcompany/login for that I write the below routing
login.compnay_login_form:
path: '/{company_name}/login'
defaults:
_controller: '\Drupal\login\Controller\LoginController::login_form'
_title: 'Login'
requirements:
_permission: 'access content'
but it's not working.
Please let me know if any other way to achieve this.
http://example.com/testcompany/login
should call to
http://example.com/u/testcompany/login
may be through htaccess or any other way?