I'm attempting to use Apache rewriterules to strip index.php from the url, but I've hit a brick wall.
The following urls currently resolve to their correct pages:
http://dev.morningstaronline.co.uk/index.php/content/view/full/215
http://dev.morningstaronline.co.uk/content/view/full/113635
But for SEO reasons I need to automatically and invisibly remove the /index.php/ part of the url. Extensive googling and searching of Stack Overflow have only lead me up blind alleys which either completely break the site or leave me at square one.
Httpd.conf sample:
<VirtualHost 109.200.2.197:80>
<Directory /var/www/sites/ms_dev>
Options FollowSymLinks ExecCGI
AllowOverride All
Options +Indexes
</Directory>
<FilesMatch "\.(js|css|html|pdf|jpg|gif)$">
SetOutputFilter DEFLATE
</FilesMatch>
CustomLog /var/log/httpd/ms-dev combined
ErrorLog /var/log/httpd/errors-ms-dev
AcceptPathInfo On
php_value date.timezone Europe/London
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
RewriteEngine On
RewriteRule ^/awstats - [L]
RewriteRule ^/hold\.php - [L]
RewriteRule content/treemenu/? /index_treemenu.php [L]
RewriteRule ^/images/.* - [L]
RewriteRule ^/var/storage/.* - [L]
RewriteRule ^/var/[^/]+/storage/.* - [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/public/.* - [L]
RewriteRule ^/var/cache/public/javascript/.* - [L]
RewriteRule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
RewriteRule ^/share/icons/.* - [L]
RewriteRule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|lib|flash|javascripts?)/.* - [L]
RewriteRule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/favicon\.ico - [L]
RewriteRule ^/robots\.txt - [L]
RewriteRule ^/crossdomain\.xml - [L]
RewriteRule !\.(gif|jpe?g|png|css|s|ico|js|jar|html)|var(.+)storage.pdf(.+)\.pdf$ /index.php
ServerAdmin test@morningstaronline.co.uk
DocumentRoot /var/www/sites/ms_dev
ServerName ms_dev
ServerAlias dev.morningstaronline.co.uk
ServerAlias test.morningstaronline.co.uk
DirectoryIndex index.php
</VirtualHost>
This is based on an old httpd.conf I inherited from our live server which also serves urls with the index.php intact (undesired).
Any help will be greatly appreciated.