Redirecting my old .html pages |
[eluser]maulik13[/eluser]
My old website was built in html and now I am replacing that with codeigniter website. So my urls have changed as well. I want to redirect old urls with 301, but I am not sure about the implementation. Old urls http://example.com/html/porfolio-fineart.html http://example.com/html/porfolio-animation.html http://example.com/html/some-page.html All my new urls are in CodeIgniter structure without .html extension http://example.com/portfolio/fineart How do you suggest I redirect my old pages to new ones? Thanks.
[eluser]maulik13[/eluser]
As I understand, one option is to use routing to map my url such that some-page.html becomes the parameter for the function. Any suggestion regarding this ? edit: Routing method worked. It was very simple actually. $route['html/(:any)'] = "home/oldstuff/$1";
[eluser]toopay[/eluser]
Also, you can set suffix at config file, so that your new uri still have .html extension.
[eluser]maulik13[/eluser]
Thanks for the tip. I am not sure if I will add suffix to my new pages. |
Welcome Guest, Not a member yet? Register Sign In |