Google started indexing my site early, so some of the routes they have go to a nonexistant page, which throws a missing controller error.
Is there a way within my routes to explicitly redirect anything after a specific parameter to 301 redirect to the proper url?
Something like
<?
if ($this->params['wrongCategory']) {
$this->redirect('/properCategory');
}
?>
But ideally within my routes?
Router::connect('/wrongCategory/*', /*do a 301 redirect here */);
I believe it will be more efficient to make this permanent redirect through the file .htaccess in your root directory, something like this: