I have some lines in .htaccess, I'm trying to flatten the URL, but it seems I'm missing something. The URL gets redirected but most of the resources are "NOT FOUND" when the URL is redirected.
Here's the code.
Options -Indexes +FollowSymLinks
RewriteEngine On
###########music#######
RewriteCond %{THE_REQUEST} \ /+profile\.php\?user=([^&]+)&title=([^&]+)&uid=([^&\ ]+)
RewriteRule ^ /%1/%2/%3? [L,R=301]
RewriteCond %{THE_REQUEST} \ /+profile\.php\?user=([^&]+)&title=([^&\ ]+)
RewriteRule ^ /%1/%2? [L,R=301]
#################internally redirect////////////
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ profile.php?user=$1&title=$2&uid=$3 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ profile.php?user=$1&title=$2 [L,QSA]
What am I doing wrong?