Wordpress Trailing Slash
I was contracted today by the webmaster of http://www.pursepage.com/. He had recently updated his installation of WordPress to 2.3. The update went smoothly, but after he was finished, he noticed that the addresses of some of his pages no longer ended with a trailing slash (e.g. site.com/page1 instead of site.com/page1/).
This was a major problem for him because google had previously indexed and ranked his pages with the trailing slash. Now google thought these were new, different pages; so it ranked them much lower than before. He was losing traffic to his site because of the missing trailing slash.
The simple solution is to tell Wordpress to add a trailing slash to all pages. But this was not an acceptable solution because he also has pages that end in .html (he didn't want them to appear as site.com/page2.html/)
Anyway, I wrote a simple plugin for Wordpress that adds the trailing slash is a page ends in the page name (as in the first example), but leaves the trailing slash off if the page ends .html or ,htm, etc.
| Attachment | Size |
|---|---|
| smart-trailing-slash.zip | 488 bytes |