Breaking down SEO nice urls
Apache, Google, SEO, optimization, Linux April 24th, 2008
Every developer knows that Apache rewrites rules to break down urls with lot’s of query strings are one of the most efficient ways to optimize your site for search engines.
Recently I have to create a series or rules to work with a extensive directory list in one site and here are some of the things that you can use when creating your rules.
1. If you are working with a directory listing or if you will use an address as part of the search on the query string, then, when creating the url create in a ordered manner way, but at the title, write it in back order way.
Think like this: When you search for a product or service on a search engine you will probably do service + city + state, right!? Then writing the title with service, city and state will increase the chances that you have to appear on the first pages on the search engine results.
2. When creating the rules be sure to put them in a logic order way. Apache will not understand too similar rules pointing to different pages if one contains less requirements than the second.
Consider this:
1st. RewriteRule ^directory/([A-Za-z+]+)/([A-Za-z]+)/([A-Za-z+].+)/?$ /list.php?&c=$1&s=$2&v=$3 [NC]
2nd. RewriteRule ^directory/([A-Za-z+]+)/c/([A-Za-z+].+)/user/([A-Za-z+,.]+)/([0-9]+)/?$ /detail.php?&c=$1&v=$2&name=$3&id=$4 [NC]
With this disposition, apache will not understand the second rule, even knowing that the rule is there, because the first rule requirements will became true before the second, but if you invert the rules, apache will understand both, since the second rule has more requirements than the first and not all the requirements where matched.
3. Try to create a rule that is a catch all for something that you are not expecting. This will avoid the user and search engine view something that is not supposed to be there.
Posts
Leave a Comment
You must be logged in to post a comment.