Downloads » Resources » SEO Strict URLs » SEO Strict URLs | 1.0

SEO Strict URLs 1.0

  • Currently 4.9/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
20 vote(s).

Resource ImageEnforces the use of unique document URLs to prevent duplicate content.

Works with MODx Version(s): 0.9.5
Submitted: Feb 24th 2007 | License: GPL - GNU Public | Downloads: 602
This resource has been deprecated.

Description

In certain cases, search engine algorithms will penalize websites for displaying identical content among multiple pages. With friendly URLs (FURLs) turned on and a FURL suffix defined, the same document can potentially be referenced using 8 separate URLs:

http://yoursite.com/doc_id
http://yoursite.com/doc_id/
http://yoursite.com/doc_id.suffix
http://yoursite.com/doc_id.suffix/
http://yoursite.com/alias
http://yoursite.com/alias/
http://yoursite.com/alias.suffix
http://yoursite.com/alias.suffix/

This plugin uses 301 redirects to forward users and search engines alike to a single URL based on plugin and FURL configuration. In addition to redirecting, the plugin can also (optionally) rewrite document links/URIs.

Example scenario, with FURLs turned on and '.html' as the FURL suffix:

http://yoursite.com/site_start.html -> http://yoursite.com/
http://yoursite.com/feed.rss.html -> http://yoursite.com/feed.rss (TV override, with basename set)
http://yoursite.com/container.html -> http://yoursite.com/container/ (if rewrite containers as folders is enabled or TV override)

Currently known limitations:
- Will only rewrite links with double quotes
- Will not rewrite URLs with relative paths (../.. etc)

Instructions

(1) Download the latest plugin code above.

(2) Go to Resources -> Manage Resources -> Plugins in the MODx manager and click "New Plugin".

Plugin name: SEO Strict URLs
Description: <strong>1.0</strong> Enforces the use of strict URLs to prevent dup content

(3) Open the downloaded plugin in the text editor of your choice and copy and paste the code into the "Plugin code (php)" text box.

(4) Click on the "Configuration" tab and copy and paste the following into the "Plugin configuration" text box:

&editDocLinks=Edit document links;int;1 &makeFolders=Rewrite containers as folders;int;0 &override=Enable manual overrides;int;1 &overrideTV=Override TV name;string;seoOverride
Once the configuration line is added, the new options will appear in an html form below the configuration line itself. Setting "Enable manual overrides" from 0 to 1 will enable URL overrides via template variable (TV).

(5) Click the "System Events" tab and check the OnWebPageInit & OnWebPagePrerender boxes.

(6) At this point, the plugin can be saved and should be enforcing strict URLs on the MODx site.

Override TV Setup

For overriding specific documents, create a new template variable (TV) named seoOverride (or whatever you have defined in the configuration) and enter the following:

Input Type: DropDown List Menu
Input Option Values: Disabled==-1||Base Name==0||Append Extension==1||Folder==2
Default Value: -1

Updates

Tested and working with the latest 0.9.6 release candidate.


( back to top )