|
Apr
27
2
|
What Mod_rewrite Won't Do For You |
|||||
I've seen many misconceptions about mod_rewrite. I believe this is because most people in this industry know what it is, but aren't programmers, or don't understand the concepts well. First, I've seen people say mod_rewrite incurs major overhead. This may be true if you ask apes to write your regular expressions, and all of your expressions are PT (pass through) and execute every other expression in the list, so I don't know where that came from. Then there are the other people who think mod_rewrite is a revelation from God, a sort of third testament between SEOs and a higher entity. This is also not true. It's not just about rewriting anymore. Rewriting will only help you if you have complex URLs, such as those with >= 2 URL parameters. In this case, one can obscure the parameters and exclude any resultant duplicate content. This is a critical part of the rewriting mantra. Obscuring the parameters otherwise can even be detrimental to ranking because hiding parameters hides potentially useful hierarchical information about the site from an algorithm. And then a search engine is faced with wading through seemingly unrelated URLs that lead to duplicated content. Then there are the people who think rewriting makes you look like a spammer. This is the only concern that I think is founded. It's an interesting concern, but I believe it's probably not a concern, and here's why. AFAIK, Google doesn't care what you do with URLs. And, technically, it cannot detect rewrites at all. It can only tell whether a page is dynamic or not, which is pretty much a moot thing to know these days. It knows this not based on file extension, but rather usually by an X-powered by, and/or the lack of an ETag, and modified date (unless, of course, your specify them explicitly). If you're truly the paranoid type, you can make your URLs end in .php or whichever dynamic language platform extension you employ. Then the rewritten URLs are indistinguishable from a non-rewritten file-based script. This cannot and will not ever incur a penalty AFAIK. Dynamic pages that actually serve static content may waste bandwidth, but otherwise they can't be considered much different. Examples of rewritten URLs done right: http://www.exceldiamonds.com/Earrings-8/4-Prong-Antique–Diamond-Stud-Earrings-821.html http://www.lawyerseek.com/Practice/In-the-News-C20/Fosamax-P76/ Notice on the latter set that 1st URL is excluded in robots.txt. This is a perfect example of when rewriting is only half of the battle. And the funniest part of all of this is: I'm currently hosting this site on Yahoo Hosting (I thought, why not, I always micromanage and use my own servers — why not let someone else do it), and they block use of .htaccess. My God, how lame! Related posts: ROTD: Mod_rewrite Rule To Remove Trailing "index.php" This handy set of rules for mod_rewrite automatically redirects any... Does URL Parameter Order Matter? This is a question I'm currently researching. I have never... URL Normalization; Slashing Duplicate Content To be honest, I'm not even sure this matters much... Chapter 3 Teaser: Provocative SE-Friendly URLs I've been feverishly working to meet deadlines on the seo... SEO With PHP Updates Errata 1. There is a small bug in the cloaking...
| ||||||
"2 Wise Comments Banged Out Somewhere On The Internet ..."
Very many thanks for a good work. Nice and useful. Like it!
I have start my site in 2007 with asp+ mssql .All pages contain query string.I have notice that google indexed our pages but very slowly.After a year google indexed 3 thousand pages.After that we have changed our technologies with php+mysql.Magic happen within a week google indexed 30 thousand pages. See the effect now I have 15,000 pages index in google.
|


















