Deleted language need help

So i decided to delete the english language on my shop, and only have my native language, since i really dont get how the SEO and sitemaps work in CS Cart. With two languages i had about 800 pages in my sitemap and Google indexed over 6000 pages. Thats a lot of duplicate content.



HERES MY QUESTION: With the english language active i had a lot of pages ending with; “?sl=EN”. Im guessing Google Webmaster in the next few days will give me errors when theese pages are gone for good.



Is it anything clever i can write in .htacces or robots.txt, so that i dont get thousands of errors from the missing (?sl=EN)-pages??



I also have pages ending with (?sl=NO) I would like that ending removed as well.





Thanks

You could add a rewrite rule to strip off the ?sl=EN portion of the URI


RewriteRule (.*)sl=EN $1 [R=301,L]


Note the above is not tested and is an example from the top of my head while sitting on the couch. Please post what you end up using for benefit of others.

Thanks for your suggestion. That one didn't work, but after trying out different rewriterules all day, i finally find one that seems to work. So if anyone is annoyed by the language-ending in the URL. Try this one:





RewriteCond %{THE_REQUEST} ^GET /.;. HTTP/

RewriteCond %{QUERY_STRING} !^$

RewriteRule .* http://www.example.com%{REQUEST_URI}? [R=301,L]





EDIT: The one above affected the admin also. Try this one instead:





RewriteCond %{QUERY_STRING} !=“” #if there is a query string

RewriteCond %{REQUEST_URI} !^/adminXX.* #your admin name: don't break admin

RewriteRule ^(.)$ /$1? [R=301,L] #remove query string



EDIT2: Crap i give up! With this code its impossible to add products to the cart! Any suggestions would be much appreciated.





EDIT 3: Looks like i didn't give up after all. This one seems to work. Me so happy!



RewriteCond %{QUERY_STRING} sl=

RewriteRule .
http://www.example.com%{REQUEST_URI}? [R=301,L]

[quote name='Onkel_Sid' timestamp='1358949125' post='153434']

Thanks for your suggestion. That one didn't work, but after trying out different rewriterules all day, i finally find one that seems to work. So if anyone is annoyed by the language-ending in the URL. Try this one:





RewriteCond %{THE_REQUEST} ^GET /.;. HTTP/

RewriteCond %{QUERY_STRING} !^$

RewriteRule .* http://www.example.com%{REQUEST_URI}? [R=301,L]





EDIT: The one above affected the admin also. Try this one instead:





RewriteCond %{QUERY_STRING} !=“” #if there is a query string

RewriteCond %{REQUEST_URI} !^/adminXX.* #your admin name: don't break admin

RewriteRule ^(.)$ /$1? [R=301,L] #remove query string



EDIT2: Crap i give up! With this code its impossible to add products to the cart! Any suggestions would be much appreciated.





EDIT 3: Looks like i didn't give up after all. This one seems to work. Me so happy!



RewriteCond %{QUERY_STRING} sl=

RewriteRule .
http://www.example.com%{REQUEST_URI}? [R=301,L]

[/quote]



It work!!



Thank you!