Forum Moderators: phranque

Message Too Old, No Replies

.htaccess remove /?s=A&p=1

Causing duplication

         

Pass the Dutchie

1:48 pm on Jan 23, 2008 (gmt 0)

10+ Year Member



Hi,

I am using a php powered directory that seems to produce duplications when I add an item to a category.

/category/

Then I add item this category and my XML sitemap generator oics up two URLs for the same page:

/category/part1/

and

/category/part1/?s=A&p=1

Any idea how to get rid of /?s=A&p=1

Thanks in advance,

Db

jdMorgan

2:35 pm on Jan 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To get rid of it, modify the site map generator.

mod_rewrite can only help if your goal is to remove the duplicate URL from search engines a little faster.

If that is the goal, then see mod_rewrite's RewriteCond directive, and use it to check %{QUERY_STRING} with a rule that permanently redirects the "/category/part1/" URL-path.

Jim

Pass the Dutchie

9:24 am on Jan 24, 2008 (gmt 0)

10+ Year Member



Hi Jim,

Yes, I thought you might say that. I guess the sitemap generator views the site differently than a Google spider. I guess we will wait and see what G picks up.

I realy was looking for a quick fix rather than hacking the XML creator which with my skills would end up in tears!

Thanks again all the same,

Db