I am trying to configure Url's in my modules but I am getting a 404 error on accessing the following Url's. This is my products page url example:
http://localhost/jambomall/web/products/products/details-product?deal_key=nvx3FtQf&url_title=3-Jojo-Cat-ponted-heels
I want the Url manager to show this:
http://localhost/jambomall/web/products/details-product/nvx3FtQf/3-Jojo-Cat-ponted-heels
How can I configure my Url manager to display this? This is not working for me.
'products/<deal_key:\w+>/<url_title:\w+>' => 'products/products/details-products'
Here is my web.php
'urlManager' => [
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => [
'products/<deal_key:\w+>/<url_title:\w+>' => 'products/products/details-product',
],
],
and my .htaccess that is in my web folder
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php