Welcome Guest, Not a member yet? Register   Sign In
how to use mod rewrite
#1

[eluser]PHPraja[/eluser]
in my project i have the urls like
Code:
http://localhost/proj/index.php/user/login
http://localhost/proj/index.php/place/place_create/228
http://localhost/proj/index.php/event/DisplayEventDetails/444/Summary

but i want to have clean urls.
Can any one help me how can i do this. Is mod rewrite concept solves this problem. If so can any one guide me how to use mod rewrite concept as i have nill knowledge of it.

Thanks in advance..
#2

[eluser]Michael Wales[/eluser]
What exactly are you wanting to clean-up? The index.php? User Guide tells you how to do that.
#3

[eluser]PHPraja[/eluser]
hi lab technician, thanks for your reply. to get rid of index.php i followed the steps given in
Code:
http://codeigniter.com/wiki/mod_rewrite/

i could get rid of index.php, but i want the url still more clean
Code:
http://localhost/proj/place/Displayplacedetails/267/summary
http://localhost/proj/event/displays/35


ie, for eg in the above urls can i get rid of the controller name and functions and ids too? so that the users of the site can not see the ids and other parameters.
Is there any other way to solve my problem?

Thanks for your help in advance.
#4

[eluser]garymardell[/eluser]
You cannot get rid of the controller name and function as codeigniter framework will not know where to look for the code you are trying to execute. You can use routing to change the names though (see user guide).




Theme © iAndrew 2016 - Forum software by © MyBB