Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
modrewrite and duplicate pages in google cosmonaut msg:4516532 9:37 pm on Nov 6, 2012 (gmt 0) I have a database of content. I use a template file to call details to populate the page so things like this domain.com/data.php?id=25 Historically I did use this structure. I now use htaccess so that I actually call these pages using domain.com/data/25 All good so far. But google is listing both urls in WMT and giving me a duplicate title error. So what can I do? I'd like to redirect the former to the latter, but nothing I try seems to work. Any help greatly appreciated. TIA Jules thanks all
lucy24 msg:4516573 10:49 pm on Nov 6, 2012 (gmt 0)
Well, let's see what you've tried so far. Include details of what "doesn't work" means. g1smd msg:4516593 12:00 am on Nov 7, 2012 (gmt 0)
As this is a topic that is asked at least once every week, there's hundreds of prior threads with example code. The last was just days ago. You summise correctly that you need a redirect and a rewrite for the whole job. Both must be coded using RewriteRules. The devil is in the details. vincevincevince msg:4516618 3:09 am on Nov 7, 2012 (gmt 0)
The key is to end the rewrite rule with the appropriate redirection, e.g. [R=301,L] in this case lucy24 msg:4516692 6:57 am on Nov 7, 2012 (gmt 0)
There will be two RewriteRules. One is a redirect. One is a rewrite. The second one is already in place, assuming that "now I use htaccess" means "now I rewrite requests for A to serve content from B".