Dev Blog » SEO
Common .htaccess Rules for SEO and Rackspace Cloud Sites
Every site we build on the Rackspace Cloud ends up needing a lot of similar rules in the htaccess file. On my local PC I've collected them in a text file, that I copy paste sections from almost every day. Most of the below examples will work on your average Linux-based server with Apache and mod_rewrite enabled. A few are RS Cloud Sites specific (as noted). In case you've never messed with this stuff before, note that this isn't a single file to copy in its entirety. Each section has a different purpose.
Yii 1.x: Adding Title Tags, Meta Descriptions, and Other SEO-Related Tags
As a followup to my post about SEO-Friendly URLs using Yii, I figured I would post this function I created for displaying SEO-related tags in the layout.Using the Gii generator with the Yii Framework, a custom base controller is created that is a parent for the others. It already contained a property called pageTitle that was used in some of the views. I decided to keep this location and expand upon it by adding in some more properties related to search engine optimization, and then create a function to display the HTML...
Clean SEO-Friendly URLs for Yii 1.x Pages
Creating SEO-friendly permalinks for an application built using the Yii Framework was a multi-step process. I figured I would outline each part. First, you can use slugs to access your view actions with the help of an extension and entries to your urlManager. Removing "index.php" is as simple as adding a few htaccess rules and changing two options. To Force trailing slashes, some code can be added to your base controller. And lastly, to give yourself cleaner "/site/page/" URLs, some more entries can be added to your urlManager...
Firefox Add-on for Copying Title Tag and Meta Description
I've created a Firefox add-on that adds a right-click context menu allowing you to copy the text from the title tag, the meta description, and the meta keywords. You also can copy them with the HTML. The add-on is available for download at the Mozilla website.