Topic: Support/Comments for SEO Strict URLs  (Read 28711 times)

Pages: [1] 2 3 ... 5   Go Down

#1: 24-Feb-2007, 05:12 PM

Coding Team
ApoXX
Posts: 132

WWW
This is an auto-generated support/comment thread for SEO Strict URLs.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
Enforces the use of unique document URLs to prevent duplicate content.

#2: 24-Feb-2007, 05:33 PM

Coding Team
ApoXX
Posts: 132

WWW
By the way, to enforce the www on URLs, users can use the following mod_rewrite rule with the Apache webserver:

Code:
# Include the following in your .htaccess file
# Replace "example.com" &  "example\.com" with your domain info
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

To enforce URLs without the www, simply remove all references of www. in the htaccess rule:

Code:
# Include the following in your .htaccess file
# Replace "example.com" &  "example\.com" with your domain info
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]

Original SEO Strict URL thread: http://modxcms.com/forums/index.php/topic,7346.0.html

More information on htaccess rewriting and friendly URL's can be found at: http://wiki.modxcms.com/index.php/Friendly_URLs_Guide
« Last Edit: 24-Feb-2007, 05:40 PM by ApoXX »

#3: 10-Mar-2007, 12:27 PM


identity
Posts: 226

WWW
This is beyond sweet!! Thanks.

Just installed and getting familiar with, though doesn't seem like much to do, which is even better.

Am running into an issue with the TvTagCloud which passes the tag parameters as:
Code:
www.mydomain.com/info.htm&tags=sometag

Any recommendations on a solution?
| Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity.
| Get the Website Planning Kit | Create a Site by Nite |

#4: 10-Mar-2007, 12:35 PM

Coding Team
ApoXX
Posts: 132

WWW
Hmm, I don't understand why TV tag cloud formats the URL as they do, I'm not even sure that it's valid. If possible, try formatting the URL as:

Code:
www.mydomain.com/info.htm?tags=sometag
« Last Edit: 10-Mar-2007, 10:34 PM by ApoXX »

#5: 10-Mar-2007, 12:45 PM


identity
Posts: 226

WWW
Okay, I'm assuming I need to dig into their code... not a strong suite, but I think I can manage. I'll let you know.

Another question. I have the xml sitemap snippet and I read in the development thread that this avoids the sitemap.xml.htm issue, which I'm doubly thrilled about... but not sure how to get the TV override to do that since it is setup on a (blank) template. Do I need to create a specific template now but leave it blank and assign the override TV to it???



EDIT: Making the change in the TvTagCloud worked.
« Last Edit: 10-Mar-2007, 12:55 PM by identity »
| Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity.
| Get the Website Planning Kit | Create a Site by Nite |

#6: 10-Mar-2007, 01:01 PM

Coding Team
ApoXX
Posts: 132

WWW
Yup, you will have to create a "blank" template and assign the custom TV to it.

The template code will be blank except for the main content:

[*content*]

#7: 10-Mar-2007, 01:10 PM


identity
Posts: 226

WWW
I must be doing something wrong, I'm sure.

I setup a new template called Empty.
Placed [*content*] in it.
My sitemap page is set to use that template and is empty except for the sitemap snippet call.
I then set the override TV to Base Name.

Never mind, just realized that I also need to set the plugin configuration to allow manual overrides. Now it works.

 Grin Grin Grin

This rocks!

cheers
| Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity.
| Get the Website Planning Kit | Create a Site by Nite |

#8: 10-Mar-2007, 01:24 PM

Coding Team
ApoXX
Posts: 132

WWW
Awesome, I'm glad it's working  Cheesy

#9: 14-Mar-2007, 04:31 PM

Coding Team

sirlancelot
Posts: 576

PHP, XML, XSL Supporter

WWW
Yup, you will have to create a "blank" template and assign the custom TV to it.

The template code will be blank except for the main content:

[*content*]
Alternatively, if you know MySQL queries, you can sort of "Hack" the automatic blank template to hold this TV in two steps:
  • Open up [PREFIX]site_tmplvars and remember the id of your seoOverride TV
  • Run this query: INSERT INTO [PREFIX]site_tmplvar_templates (tmplvarid, templateid) VALUES ( [id], 0 );
Of course, replace [id] with the id of your TV and [PREFIX] with your MODX db prefix. If you don't know MYSQL or how to do the instructions above, just go with ApoXX's method, it's easier. This method just produces less clutter in the templates. There's no other advantages.

Have fun! Only tested on MODx 0.9.5 - 0.9.6

#10: 14-Mar-2007, 07:22 PM

Coding Team
ApoXX
Posts: 132

WWW
Thanks for the tip Sirlancelot.

#11: 15-Mar-2007, 04:10 PM

Geo88
Posts: 68

ModX greenhorn

Hi.I have discovered a inconsistency bug in this version.
I have a container with children , and it's resolved url is something like this: http://yoursite.com/doc_id/ , but, on the page, in the menu generated by wayfinder it appears like this: http://yoursite.com/doc_id.html . Also , This issue doesn't appear for first level items , but only for the children from what I can see.
By the way,is there any intention of implementing the feature request I wanted (the one with the folders with no children to appear as containers-see the old thread) as an official configuration option ?

#12: 18-Mar-2007, 08:41 AM


almays
Posts: 49

WWW
Hello.

I am busy with migrating the site from old phpnuke with urls like /module.php?name=Pages to MODx.

In order to keep search engines happy and informed about new addresses of the pages I need to have a way to send 301 redirect, when someone comes to that old page like /module.php?name=Pages.

I have made some plugin prototype, which is described at
http://modxcms.com/forums/index.php/topic,13134.0.html

I have also started some discussion in the thread
http://modxcms.com/forums/index.php/topic,8316.0.html
but nothing interesting is there.

The plugin doesn't work yet. Something is wrong there.

I'd like to ask you for the help in developing this new plugin, or just include the described functionality into yours. As soon as it is also about SEO and 301 redirect.

#13: 19-Mar-2007, 10:44 PM

Coding Team
ApoXX
Posts: 132

WWW
@Geo88:

I believe I have fixed the issues you reported with sub-folder rewriting. I have also integrated support for correct rewriting of empty containers when using &makeFolder, the new parameter is called &emptyFolders.

Edit: The updated (and confirmed working) code is now available in the repository: http://www.modxcms.com/SEO-Strict-URLs-1335.html

@almays:

Did you come up with a solution to your plugin yet? .. I saw you had posted something new in the thread. I would be more than happy to integrate the functionality into SEO strict and think it would fit in with the overall purpose of the plugin.
« Last Edit: 23-Mar-2007, 03:45 PM by ApoXX »

#14: 23-Mar-2007, 07:29 PM

Coding Team

pixelchutes
Posts: 889

WWW
Nice! v1.0.1 corrected the weird 404 behavior I was experiencing when alias_path was OFF. Now it sends proper 404 HTTP response again Smiley
Mike Reid - www.pixelchutes.com
MODx Team Member / Contributor
[Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
________________________________
Where every pixel matters.

#15: 27-Mar-2007, 11:30 PM

Hypercubed
Posts: 4

Is this plugin incompatible with the FileDownload  Plugin?  The two don't play nicely on my site.

#16: 28-Mar-2007, 05:47 AM

Coding Team
heliotrope
Posts: 2,535

WWW
Hi,

a really handy plugin but I have errors with 404 page

here are my response headers results when seo_strict(version 1.0.1) is enabled (test.html doesn't exist)

Quote
#1 Server Response: http://**.mydomain.fr/test.html
HTTP Status Code: HTTP/1.1 301
Date: Wed, 28 Mar 2007 10:34:22 GMT
Server: Apache
Cache-Control: private, must-revalidate
P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"
X-Powered-By: PHP/4.4.4
Set-Cookie: SN440eb91313063=a373aadff528f32f50675724cef722cb; path=/
Vary: Host
Location: /traduction-en-ligne/erreur_404.html
Connection: close
Content-Type: text/html
Redirect Target: /traduction-en-ligne/erreur_404.html

seo_strict disabled

Quote
#1 Server Response: http://**.mydomain.fr/test.html
HTTP Status Code: HTTP/1.1 404
Date: Wed, 28 Mar 2007 10:42:16 GMT
Server: Apache
Cache-Control: private, must-revalidate
P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"
X-Powered-By: PHP/4.4.4
Set-Cookie: SN440eb91313063=c72cd6451b0ef471577390c786e55a42; path=/
Vary: Host
Connection: close
Content-Type: text/html; charset=iso-8859-1

In this case the header is fine but the error page is  not sent anymore

Let me know if you need more infos

:-)

edit : modx version is 0.9.5
« Last Edit: 28-Mar-2007, 06:02 AM by heliotrope »

#17: 28-Mar-2007, 03:19 PM

Coding Team

pixelchutes
Posts: 889

WWW
Hi,

a really handy plugin but I have errors with 404 page


heliotrope,

Have you tried getting the latest copy (1.0.1 I think) ? I had brought up the issue of non-404 headers to ApoXX, and it solved it for me Smiley

Please confirm you've got the MOST recent version (within the last week) and if not, please try and report back Smiley
Mike Reid - www.pixelchutes.com
MODx Team Member / Contributor
[Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
________________________________
Where every pixel matters.

#18: 31-Mar-2007, 02:55 PM

Hypercubed
Posts: 4

Is this plugin incompatible with the FileDownload  Plugin?  The two don't play nicely on my site.

I have discovered that the SEO Strict URLs plugin is incompatible with invalid (but common) URL query strings.  Query strings are supposed to start with an ampersand (&) with subsequent arguments using a question mark (?).  Unfortunately many applications are not careful about this and just use &.

#19: 31-Mar-2007, 03:28 PM

Coding Team

sottwell
Posts: 10,530

WWW
This can be tricky since an actual MODx url is index.php?id=xx, but if you're using friendly URLs, then you get the alias instead, so it's hard to tell when to use a ? or a & for your query string. The best thing to do is to use a variable, and have an operation to check the status of friendly URLs; if they are on, set it to ? and if not set it to &.

Code:
$querystr = ($modx->config['friendly_urls'] == `1`) ? '?' : '&';
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#20: 31-Mar-2007, 04:06 PM

Foundation

OpenGeek
MODx Co-Founder
Posts: 6,972

damn accurate caricatures...

WWW
Actually, the best way is to build URL's without an initial symbol using $modx->makeUrl()...

Code:
$modx->makeUrl(12, '', 'param1=2&param2=1');
Jason Coward
MODx Co-Founder
xPDO Founder
CTO @ Collabpad
work productively.
work intelligently.
work together.
Light is just a vibration of a note too. Everything is. You've got to keep that in mind.
  Frank Zappa
Pages: [1] 2 3 ... 5   Go Up
0 Members and 1 Guest are viewing this topic.