Forum Moderators: phranque
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
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /[^?\ ]*\?[^\ ]*\ HTTP/
RewriteRule ^(.*)$ http://example.com/$1? [R=301,L]
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