Hello mates... I have my site all based in an old script, who creates (I don't know fcking why) 4 pages FOR THE SAME CONTENT When google indexes all of them, I have 4 pages with same content, title and meta-tags --' what means: google see my sites as a BIG SPAMMER... For example, (I won't say the domain, for security reasons, thanks): /index.php?task=view&id=870 /view/870/NAME-OF-THE-GAME.htm /view/870/NAME-OF-THE-GAME.html /view/870/NAME-OF-THE-GAME All these 4 URLs go to the same page... What I need write in my htaccess to redirect ALL of these 4 pages to the same? And well, my site is all dynamic...so everyday a lot of new (and duplicate) pages are created...I need a code who redirect everything forever... I think the last three is quite easy (the .htm, .html and without extension)...but I don't even know how to do this one. Can someone help me with this? Really thanks guys =)
Options +FollowSymLinks RewriteEngine on RedirectMatch 301 (.*)\.html$ http://www.example.com$1 Code (markup): you would add a new line for each type to redirect
I tried this code, but when I type, for example, the www.site.com/view/870/NAME-OF-THE-GAME.html, it redirects to: http://site.com/view/870/NAME-OF-THE-GAME?task=view&id=870&name=NAME-OF-THE-GAME Please mate, help me with this. I don't know a fcking nothing about .htaccess redirections and these things...