I'm trying to get new url using .htaccess file but I can't get php variable name from the url.
.htaccess code is here
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^courses/([a-zA-Z0-9\-\_]+)/$ courses.php?cat-name=$1
php code is
echo $_GET['cat-name'];
But showing error undefined index cat-name. my url is http://www.mywebsite.com/courses/php/. So how can I access the php variable?