1
I have this code that I’m using in my MVC that I did for studies:
class Como_Funciona extends Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$data = [
'title' => SITE_TITLE . ' - ' . SITE_SUBTITLE,
'brand' => SITE_BRAND,
];
$this->_view->render_template('header', $data);
$this->_view->render_template('navbar', $data);
$this->_view->render_template('pages/faq', $data);
$this->_view->render_template('footer', $data);
}
}
My url is as follows:
http://domain.com/como_funciona
I’d like to leave you like this:
http://domain.com/como-funciona
It is possible to do this with . htaccess?
But I’ll get through
-
instead of_
? this is my doubt.– user76271
Yes! is recommended by the good practices send in the url with the "-" tab instead of "_".
– Walmir Silva
my_url_para_modify is a correct method? If I pass the localhost/test/my-url-to-modify url it finds the method?
– Micael Ferreira