I wish to redirect all demands for index.htmlphpphp5 to http://www.domain.co.uk/ using mod_rewrite and I have replicated the code from the book on seo with PHP verbatim, then put in the php5 option, however it is not working. This really is my complete .htaccess file:

RewriteEngine On

#translate any .html ending into .php5
RewriteRule ^(.*)\.html$ /$1\.php5

RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php5|php|html)\HTTP
RewriteRule ^(.*)index\.(php5|php|html)$ /$1 [R=301,L]

#change / for ?
RewriteRule ^(.*)\.html/(.*)$ /$1\.html?$2

#strip .html from search res page
RewriteRule ^(.*)search/(.*)$ /$1search_results\.html/search=$2

#translate product details link from search res page
RewriteRule ^products/(.*)/(.*)/(.*)$ /product_details.php5?category=$1&title=$2&id=$3 [L]

#Translate products/psorisis/chamomile-skin-cream-P[x] to productview.php5?id=1
RewriteRule ^products/.*-P([0-9]+) /productview.php5?id=$1 [L]

I dunno what's wrong with this, and also the relaxation works good. Anybody have ideas?

I believe it is because your RerwriteCond finishes with \HTTP.

Change it out to:

RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php5|php|html)
RewriteRule ^(.*)index\.(php5|php|html)$ /$1 [R=301,L]

If you wish to match the HTTP from the_REQUEST then put an area there

RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php5|php|html)\ HTTP
RewriteRule ^(.*)index\.(php5|php|html)$ /$1 [R=301,L]