Jump to content

Google Indexing Wrong URL's - .htaccess


ncovill

Recommended Posts

I am severely confused by this... I have made a bunch of mod_rewrites in my .htaccess and they work perfectly. I have all the links on my site point to the search engine friendly rewritten links and what not. For some reason, each new post made, Google indexes the old "/postdetails.php?id=##" link instead of the new "/category/id#" link. Below is part of my .htaccess:

 

RewriteRule ^page=([0-9_-]*)$ /index.php?currentpage=$1
RewriteRule ^index.php/page=([0-9_-]*)$ /index.php?currentpage=$1

RewriteRule ^([a-zA-Z0-9_-]+)/page=([0-9_-]*)$ /pages.php?action=get_entries&cat_id=$1&currentpage=$2 [L]
RewriteRule ^([a-zA-Z0-9_-]+)$ /pages.php?action=get_entries&cat_id=$1 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([0-9_-]+)$ /postdetails.php?cat=$1&id=$2 [L]

 

Any help would be greatly appreciated as this has been eating at me for a bit!

Link to comment
https://forums.phpfreaks.com/topic/187355-google-indexing-wrong-urls-htaccess/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.