I have a small issue with some .htaccess rules on our website - http://www.presencemultimedia.co.uk
We've recently re-built the website using CodeIgniter. To use nice URLs I've added some lines to our .htaccess file as below :
RewriteEngine on
# CodeIgniter rules (forwards requests to index.php)
RewriteCond $1 !^(index\.php|images|robots\.txt|public)
RewriteRule ^(.*)$ /index.php/$1 [L]
# rewrites path to our primary domain (www.presencemultimedia.co.uk)
RewriteCond %{http_host} !www.presencemultimedia.co.uk$
RewriteRule ^(.*)$ http://www.presencemultimedia.co.uk/$1 [r=301,nc]
The second rewrite rule is designed to ensure the domain is always our primary domain (www.presencemultimedia.co.uk).
The issue I have is that if the website is accessed by an aliased domain, e.g. http://www.prmulti.com, the URL is rewritten to the primary domain but adds /index.php/ to the path.
For example - http://www.prmulti.com/about/ should rewrite to http://www.presencemultimedia.co.uk/about/ instead of http://www.presencemultimedia.co.uk/index.php/about
Can anyone see where I'm going wrong?
Cheers, Phil