• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove part of the URL segment?

#1
[eluser]term25[/eluser]
Hi, I would like to ask you how could I remove part of my url which look like this:

http://localhost/ci/articles/show_full_article/alias-of-that-article

so it look like this:

http://localhost/ci/articles/alias-of-that-article

I am making queries not by id but by alias, which is a value that I save with others when creating article to the database.

show_full_article is a function in my articles controller.

I need to somehow make this fonction not to appear in my url.

Could it be done using routes.php?

I am using this for getting/calling this function:

for example
Code:
<?php echo anchor('articles/show_full_article/'.$obj->alias, 'Read more'); ?>:

Thanks for any advice.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.