homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

modrewrite and duplicate pages in google

 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


Historically I did use this structure.

I now use htaccess so that I actually call these pages using


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



 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.


 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.


 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


 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".

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved