I want to redirect some links for not having duplicate content on google
The links are like this.. http://www.example.ro/adidasi_dama.php?page=1
I made the rewrite rule to .. http://www.example.ro/adidasi-dama/pagina-1/
with this code..
RewriteRule ^([a-zA-Z]+)([-_]){1}([a-zA-Z]+)/pagina-([0-9]+)/$ $1_$3.php?page=$4
RewriteRule ^([a-zA-Z]+)([-_]){1}([a-zA-Z]+)/$ $1_$3.php
RewriteRule ^([a-zA-Z_]+)/pagina-([0-9]+)/$ /$1.php?page=$2
But now… both versions are working… .. i want to automaticaly redirect from 1st link to second… but i need it for all my pages..
i have many links for example
- http://www.example.ro/noutati.php?page=1
- http://www.example.ro/adidasi_fete.php?page=1
-
http://www.example.ro/pantofi_barbati.php?page=1
…
Thank you very much!
Try adding these rules to the same htaccess file: