too long

I want to redirect old pages (like "index.php/sdasdasd/sdasda/") to their new content. I'm using PHP to do this, as the data is stored in MySQL. The problem is that when the url starts with "index.php" it isn't redirected to the correct page. In the background it should call: "index.php?url=index.php/sdasdasd/sdasda/". How can I fix this in the .htaccess?

RewriteEngine on

RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]

RewriteRule ^(.*/)?\.svn/ - [F,L]
RewriteRule \.(gif|jpg|png|css|flv|js|swf|php)$ - [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+\.php)$ index.php?url=$1 [QSA,L]
RewriteCond %{REQUEST_URI} !(\.)
RewriteCond %{REQUEST_URI} !(\.)
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} .*

RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

If you have any other improvements to this code, then you're welcome to suggest changes.

How can I fix this in the .htaccess?

You have one condition that is duplicated:

RewriteCond %{REQUEST_URI} !(\.)
RewriteCond %{REQUEST_URI} !(\.)

You can remove one of them.

But in order to redirect requests to /index.php/something, you need to add this just below RewriteEngine on:

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