Original URL
mydomain.com/main/portfolio
Now I need to remove the controller name from the URL with the below Route which i have done successfully:
//Controller Name: main
$route['(:any)'] = "main/$1";
My new URL is good:
mydomain.com/portfolio
But the original URL is still accessible which I don't want for SEO purposes:
mydomain.com/main/portfolio
How can I have my good URL run as normal and block the old URL.
Thanks.
.htaccessfor this