'Remove index.php from URL (CodeIgniter)
I've removed the index.php throught this code:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /leet/index.php/$1 [L]
But when I submit form <?=form_open('signup');?> and the page refreshes the url changes its value to localhost/ci/index.php/signup.
Is it possible to remove it?
Solution 1:[1]
You must check your config.php inside your application\config directory, as you can see, locate your
$config['index_page'] = 'index.php';
Change that to
$config['index_page'] = '';
I hope it helps!
Solution 2:[2]
Use it like this:
<?= form_open_multipart(base_url().'/controller_name/function_name') ?>
I hope it helps you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | arjayosma |
| Solution 2 | ouflak |
