Welcome Guest, Not a member yet? Register   Sign In
.html to CodeIgniter
#1

[eluser]Nowakis[/eluser]
Hi

how do I understand my application CI files in HTML, without specifying the Controller and Method?

For example:

exemple.com/sign.html

TO:

exemple.com/User/Sign

Where:
User is the Controller
Sign is the Method

All this in my application CI Site.

And in the user's browser should appear only example.com / sign.html

Somebody help me?
Samebody help me?
#2

[eluser]Jelmer[/eluser]
Just read the userguide about routing:
http://ellislab.com/codeigniter/user-gui...uting.html

You could rewrite everything like this:
Quote:$route[':any'] = "controller_1/function_1";
Just remember to put any rules for other controllers before this one.

And take a look in the application/config/config.php file near line 60 for this:
Code:
/*
|--------------------------------------------------------------------------
| 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-guide/general/urls.html
*/

$config['url_suffix'] = "";
Which you can set to ".html"




Theme © iAndrew 2016 - Forum software by © MyBB