Url Rewriting in Codigniter - Is it possible? |
[eluser]eshban[/eluser]
Hi, I need to know that is there any tutorial that how to re-write URL's for the application developed in CODEIGNITER??? I searched google but did not find any results. Here is what i need my url: www.abc.com/index.php/client/moredest/ seo url: www.abc.com/more-destinations/ my url: www.abc.com/index.php/client/destinations/content/0/5 seo url: www.abc.com/legal-statement/ I need to know that can i change my controllers in all over the applicaiton or is there any way to do url rewriting via .htaccess please help in this regard. Eshban
[eluser]bigtony[/eluser]
Take a look at the [url="http://ellislab.com/codeigniter/user-guide/general/routing.html"]Routing[/url] page of the user guide.
[eluser]jparent[/eluser]
Yes but, that, don't show how remove de subdir. I mean: www.example.com/my_application_folder/class/controller to www.example.com/class/controller
[eluser]rogierb[/eluser]
That can probably be done in your .htaccess Code: RewriteBase /
[eluser]jparent[/eluser]
I have that rule now and it doesn't work. How the server now it must to navigate to /my_application_folder/ when the .htaccess is inside /my_application_folder/
[eluser]rogierb[/eluser]
You answered you own question, it can't. Put the .htaccces in your root and do not modify the one in your application folder. That should do the trick.
[eluser]khagendra[/eluser]
create a .htaccess file and add the following lines in the file Quote:RewriteEngine on ---You can use notepad to create .htaccess file. --- keep this file at the location of codeigniter index.php(i.e. in the root folder) |
Welcome Guest, Not a member yet? Register Sign In |