Codeigniter redirection

Asked

Viewed 122 times

1

I developed an application in Codeigniter 3 at the company where I work and need to replace an old one. The situation is that the url address will be changed but we can not disable once the previous one, will be redirected who enter through the previous link should redirect to the new one and we have articles like those of a blog. For example: http://domain.com.br/blog/artigos/1 I need you to be redirected to http://novodomain.com.br/artigos/1

I was trying to do this by codeigniter through Routes.php, but without success.

Thanks for your help.

1 answer

2

Try placing the URL in the config of the old project: Ex:

$config['base_url'] = ' http://novodomain.com.br';

When the user accesses the old URL, it redirects to the new one.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.