CodeIgniter Forums
.html to CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: .html to CodeIgniter (/showthread.php?tid=14909)



.html to CodeIgniter - El Forum - 01-20-2009

[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?


.html to CodeIgniter - El Forum - 01-20-2009

[eluser]Jelmer[/eluser]
Just read the userguide about routing:
http://ellislab.com/codeigniter/user-guide/general/routing.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"