[eluser]kettch[/eluser]
[quote author="TheFuzzy0ne" date="1240532914"]Have you enabled hooks in the config.php file?[/quote]
Yup:
Code:
$config['enable_hooks'] = TRUE;
In the hooks.php I have:
Code:
$hook['pre_system'] = array(
'class' => '',
'function' => 'URLRewrite',
'filename' => 'URLRewrite.php',
'filepath' => 'hooks'
);
And in the URLRewrite.php file I have:
Code:
<?php
function URLRewrite(){
if (isset($_GET['view']))
{
$redirect = 'Location: '.config_item('base_url').'page/id/'.$_GET['view'];
header($redirect);
}
}
?>
This is my first time using hooks so maybe I'm doing something wrong?