I am facing an issue in my YII2 project. I am adding the URL suffix in the rules and it is throwing me 404 error. I don't know why i am facing this issue. Let me share my url Manager rule
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'suffix' => '.html',
'rules' => [
'login'=>'userportal/default/login',
],
],
If i remove suffix or comment that line my web application will run fine. But if with this code the web application throws 404 error.
I am using xampp on my localhost with apache server.
The .htaccess in web folder looks like this
RewriteEngine on
RewriteRule ^index.php/ - [L,R=404]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Do let me know what is wrong?
Thanks