I am trying to rewrite the URL of a CodeIgniter application, though it doesn't seem to work. I have the following things set;
$route['pages/(:num)/(:any)'] = "pages/view/$1/$2";
$config['index_page'] = '';
Then I have the following .htaccess;
RewriteEngine on
RewriteBase /
RewriteRule ^pages/(.*)/(.*)$ /index.php/pages/view/$1/$2 [L]
It just says the page is not found (an Apache error, not CodeIgniter). It works when I browse to the original link (http://domain.tld/index.php/pages/view/1/welcome) but not when browsing to the 'desired' link (http://domain.tld/pages/1/welcome).
What am I doing wrong?
^pages/(.*?)/(.*)$