Imagine we have the controller
class Test
{
public function index()
{
echo 'hello!';
}
}
So I can call it like test/index or for the best practice set route something like $routing['test'] = 'test/index';
So now I can call it with two ways test or test/index and same page have two links! So I want to know what would be the best solution for this situation?
All that I am thinking maybe check in index if I have in segment 'index' so redirect to route just 'test'.
I working with Codeigniter but I think this is question is SEO'specific too.
Summary: What would be the best to prevent double linking for the same content if I use routing?
Thanks!