Several people have in the last few months asked for help with code that parses a URL into a query, like this.
/www.site.com/param/val/param2/val/param3/val
As I understand it this is getting done in the hopes of making URI’s nice and pretty for SEO purposes. It’s also a great way to lose page rank. Here’s why.
First, search engines have no problem parsing query strings. However, query strings aren’t seperate pages. Hence
And so on. Each of these sequences are considered separate pages. When the search engine realizes they are the same page it lowers the ranking of the page for spam.
When using mod rewrite to allow query strings to be set up in this manner, keep in mind that you must choose an order for the parameters and enforce it to avoid the illusion of duplicate pages and being penalized. And don’t be afraid to use query strings. Google knows that
For most pages, it would simply be something like /products, or /contact-us, but to pass parameters in, you’d use the normal query string.
What michael presents is a very annoying situation where you must follow an exact order and deviations can cause issues due to the coupling of the URI as a request and as a parameter.
I’m not against moving it, but I posted it here because typically PHP is used with mod_rewrite to perform these sorts of operations and the topic has come up frequently enough in the past 3 months I figured it warranted comment.
Thread moved to the Server Configuration, Apache & URL Rewriting forum.
If your using Apache then you can do re-writes using .htaccess once the rewrite module is enabled by un-commenting the line LoadModule rewrite_module modules/mod_rewrite.so httpd.conf and rebooting once the change has been saved.
Your argument if fallacious. When using the path method and redirecting WITHOUT an R=301, the actual script is hidden from the visitor (which includes SE’s). When you post something like this, please understand what you’re posting so newbies will not get the wrong impression.
If you doubt me, go to http://wilderness-wally.com and tell me which script is serving all the @#$% articles on the website.
The content the script outputs however is NOT so hidden, and if the content matches, or nearly matches, the output of the script for another “page” on the same site, the spider will declare it a spam dupe and lower the page rank of BOTH pages.
When you post something like this, please understand what you’re posting so newbies will not get the wrong impression.
I do understand what I’m talking about and you sir are the one in error. Lower your bombast please.