php - .htaccess doesn't support inserting data on codeignater -


i have .htaccess file on server (using codeignater)

this view page

<form action='cms/register' method ='post'> bla bla bla </form> 

and contoller-model know problem when click submit nothing happen if change form heading

<form action='cms/index.php/register' method='post'> 

evreything works problem .htaccess.

how can solve it?

use dynamic urls this:

$this->load->helper('url'); 

and in form:

<form action="<?php echo site_url("register"); ?>"> 

if site_url() not working try base_url().

update:

copied application/config/config.php, change 'index.php' '' $config['index_page'] if using mod_rewrite.

/* |-------------------------------------------------------------------------- | index file |-------------------------------------------------------------------------- | | typically index.php file, unless you've renamed | else. if using mod_rewrite remove page set | variable blank. | */ $config['index_page'] = 'index.php'; 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -