CodeIgniter Forums
search engine friendly urls - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: search engine friendly urls (/showthread.php?tid=27197)



search engine friendly urls - El Forum - 02-03-2010

[eluser]face1m[/eluser]
What is the best way to make my site url’s search engine friendly? Currently, I have my controller in the route[default controller] = mycontroller in the route.php file. Thanks.

rick mcelderrry


search engine friendly urls - El Forum - 02-03-2010

[eluser]Jamie Rumbelow[/eluser]
Hey Rick,

Well, you get SEF URLs out of the box! The first segment will map to the controller, the second to the method, and the third to any parameters. Read the User Guide for more on how CI's URLs work!

Jamie


search engine friendly urls - El Forum - 02-03-2010

[eluser]face1m[/eluser]
thanks Jamie:

Out of the box requires index.php . What i was asking if there is a difference if i were to use a .htaccess file compared to a using the default controller in the routes.php file.

thanks

rick mcelderry

PS The manual doesn't mention the difference between the two or if one is preferred over the other. However, I do find the manual extremely useful. It is very important to me for the search engines to be able to find and index my sites.
Thanks again for all your help. I sincerely appreciate it all.