we are using codeigniter as our current framework, but now we are working on laravel to enhance some features, but one of the problem we are facing is to give the fallback for old url use in codeigniter, our current url looks like
www.school.com/index.php/student/subjects/102030
how to convert this to this
www.school.com/students/subjects/102030
having problem dealing with index.php in our urls, as they are indexed in google which would really annoy them, and would be awful with seo
You can use an .htaccess if you are using apache. After some tests something like this should work:
RewriteEngine on
RewriteRule ^index\.php\/student\/subjects\/([0-9]+)$ students/subjects/$1 [R=301,L]
It's making a 301 redirection so the new urls replace the old ones in search engines after a while.