Forum Moderators: phranque

Message Too Old, No Replies

Static site taking on old page id's

page id rewrite

         

traska

3:39 am on Dec 11, 2009 (gmt 0)

10+ Year Member



Hi this is my first post on here.

I now have a basic static site on a domain that had a wordpress blog on it a month ago.

Google indexed the wordpress site's homepage as examplesite.com/?page_id=6 .
Now with the static site on the domain google has still indexed the homepage with the ?page_id=6 appended to the end of it and the static site is not giving a 404 error when you navigate to examplesite.com/?page_id=6 which is weird.

This has caused the domain to lose it's previous 1st page ranking and my client to look at me funny.

I need to have google index the homepage without the dynamic page extension, how do I go about doing this? I've read a bunch into .htaccess rewrites but can not find one to work for my sites problem.

please help me

jdMorgan

3:16 pm on Dec 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have any currently-working mod_rewrite rules, then adding something like

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /[^?\ ]*\?[^\ ]*\ HTTP/
RewriteRule ^(.*)$ http://example.com/$1? [R=301,L]

will likely fix your problem(s).

If you have no working mod_rewrite code at present, I'd recommend a review of our Forum Charter and the resources that it cites, the tutorials and examples in our Forum Library, and some of the recent threads here in the forum dealing with query string issues. Links to the Charter, Library, and site-search functions appear at the top of this page.

Please don't skip the research phase. mod_rewrite is not by any means a "cut-and-past" proposition. It is server configuration code and a single typo or tiny logic error can kill your server and/or search rankings. Your code must be 100% correct for your server set-up and the specific needs of your site.

Jim

traska

6:20 pm on Dec 11, 2009 (gmt 0)

10+ Year Member



Thank you for the response.

Looks like I will end up having to learn it to fix it, no biggie.

Thanks again