Welcome Guest, Not a member yet? Register   Sign In
redirect() incorrectly adding a .html suffix [SOLVED]
#1

[eluser]CoderReborn[/eluser]
In one of my controllers, I end my index() method with
Code:
redirect('/profile/jsmith');

However, the redirection sends me to "/profile/jsmith.html"

How do I get rid of the .html suffix that is incorrectly inserted?

For a number of reasons, that is causing me problems.

Thanks.
#2

[eluser]mikeymayhem[/eluser]
Hey you havent got the suffix specified in your config/config.php file have you?

|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| http://ellislab.com/codeigniter/user-gui.../urls.html
*/

$config['url_suffix'] = "";
#3

[eluser]CoderReborn[/eluser]
Yes, that was the problem. Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB