Detail pages all use the same detail template, which is specified as the default detail template.
URLs look like this and work fine:
http://www.mysite.com/news/32/64/friendly-title-here
There's a page that lists news items by category, and has a series of tags like so:
Code: Select all
{news category='Category Name' sortby='news_title' sortasc='true'}
This all works fine.
What we are finding is that these pages are also showing up in search engine indexes (Google, Yahoo, etc.) as
http://www.mysite.com/news/32/[b]109[/b]/friendly-title-here
109 is the content_id of the homepage, which uses a completely different template, so those versions of the page are all screwed up.
There are links to recent news items from the homepage, but those links all point to the correct (...../64/....) version of the URL.
I can't figure out:
A. Why search engines are indexing the ....../109/..... version of the URL, since I can't find any pages that link to those URLs.
B. Why the rel=canonical doesn't seem to be working - both versions of the page have the rel=canonical set, and they both list their own URL.
This is the code in the template file for the canonical:
Code: Select all
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
Thanks!
Cms Version: 1.9.4
Installed Modules:
* CMSMailer: 2.0.1
* FileManager: 1.1.0
* MenuManager: 1.7.6
* ModuleManager: 1.4.1
* News: 2.11.2
* nuSOAP: 1.0.2
* Printing: 1.1.2
* Search: 1.6.10
* ThemeManager: 1.1.4
* TinyMCE: 2.8.4
* CGExtensions: 1.17.6
* CGFeedMaker: 1.0.4
* CGSimpleSmarty: 1.4.1
* FormBuilder: 0.5.11
* CMSSimplepie: 1.0
* CGBlog: 1.3.1
* Archiver: 0.2.3
* SiteMapMadeSimple: 1.2.2
Config Information:
* php_memory_limit:
* process_whole_template: false
* output_compression: false
* max_upload_size: 2000000
* default_upload_permission: 664
* url_rewriting: mod_rewrite
* page_extension:
* query_var: page
* image_manipulation_prog: GD
* auto_alias_content: true
* locale:
* default_encoding: utf-8
* admin_encoding: utf-8
* set_names: false
Php Information:
* phpversion: 5.2.16
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 64M
* max_execution_time: 30
* output_buffering: On
* safe_mode: Off (False)
* file_uploads: On (True)
* post_max_size: 12M
* upload_max_filesize: 10M
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
* xml_function: On (True)
Server Information:
* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.91