The problem is this probally has nothing to do with your site or our program.
First off your talking two different things which is causing your issue because your urls are bad.
Your bad links are probally from some spam bot or bad google bot I would have no idea because quite frankly from our programs operation the cat variable is always
NUMERIC.
Now given that constant here in our programs normal operation your now electing to use
SEO urls which is fine. However your url is bad so your
seo url is not going to be correct.
/mygallery/showgallery.php?cat=wdsbwgjgr&page=11
The proper url is probally something like
/mygallery/showgallery.php?cat=501&page=11
A url like that would be converted into a category
seo url something like this
/mygallery/g501-my-cat-name-page11.html
You can see that as an example here
Toys that Go - PhotoPost Photo Gallery
A proper photopost url to a photo would be say this
/mygallery/showphoto.php?photo=31&cat=501&title=sometitle
That would translate to say this
/mygallery/some-cat-name/p31-some-title.html
see an example of that can be seen here
2006_Fab_Fords_Mustangs_243 - PhotoPost Photo Gallery
So really whatever is going on with your google links or how they got there has nothing particularly to do with our program or its operation.
I can not say how those links got in google since our program has nothing to do with putting links in google.
You can add 404 redirects as a backup but your issue has to do with google and its operation. Google is the one who puts links in there site. They are not getting those links from your site or our program and you need to tell them that. Ask them where they are getting those bad urls because they do not come from your site.
You can turn off
seo urls but personally I have google flush your sites links and do a complete reindex of your site because the issue is from them.