Hello
Recently I have made changes to htacces that rewrites url. my original url for item is sitename.cc/www/item.php?id=399&ITEM-NAME after rewrite it gets like this sitename.cc/www/id/ITEM-NAME and for category original is sitename.cc/www/category.php?qid=21&CAT-NAME after rewrite it gets like this sitename.cc/www/c-id/CAT-NAME

to rewrite those URLs I use code in htacces like this

Options All RewriteEngine On

RewriteBase /www/

#for item that has name

RewriteCond %{THE_REQUEST} \ /www/item\.php\?id=([0-9]+)&([^&\ ]+)
RewriteRule ^ %1/%2? [L,R=301]
RewriteRule ^([0-9]+)/(.*)$ item.php?id=$1&$2 [L,QSA,NE]

#for item without name

RewriteCond %{THE_REQUEST} \ /www/item\.php\?id=([0-9]+)
RewriteRule ^ %1/? [L,R=301]
RewriteRule ^([0-9]+)/(.*)$ item.php?id=$1 [L,QSA,NE]

#for category with name

RewriteCond %{THE_REQUEST} \ /www/category\.php\?qcatid=([0-9]+)&([^&\ ]+)
RewriteRule ^ %1/%2? [L,R=301]
RewriteRule ^k-([0-9]+)/(.*)$ category.php?qcatid=$1&$2 [L,QSA,NE]

#for category without name

RewriteCond %{THE_REQUEST} \ /www/category\.php\?qcatid=([0-9]+)
RewriteRule ^ k-%1/? [L,R=301]
RewriteRule ^([0-9]+)/(.*)$ category.php?qcatid=$1 [L,QSA,NE]
On the pages item.php and categort.php I use

<base href="/www/">
This rewrite works fine but when I make site map, I use XML-sitemaps.com script for that, it makes regular urls like they should be and ads some links that does not exists anywhere on pages, like this one sitename.cc/www/index.php/help/help/item.php?id=3256&ITEM-NAME looks like he ads for some reason first index.php and after that directory he finds on the page. I also saw that google index regular rewritten url and also one like this. My server returns 404 for this kind of url but I do not know what is error so they generate non existing URL Also in google analytics I can see that there are the items without name but they have URL like this sitename.cc/www/id/index.php instead sitename.cc/www/id/

Thanks for any help or idea on how to solve this issue