ZydoSEO

msg:4510260 | 9:44 pm on Oct 20, 2012 (gmt 0) |
If your web site is hosted on Apache, using Mod_Rewrite/.htacces it would be very easy to 301 redirect any FB Likes URLs back to clean URL. You could use something like the following in the .htaccess in the root of your web to accomplish this: RewriteBase / RewriteCond %{QUERY_STRING} fb_action_ids [NC, OR] RewriteCond %{QUERY_STRING} fb_action_types [NC, OR] RewriteCond %{QUERY_STRING} fb_source [NC, OR] RewriteCond %{QUERY_STRING} fb_aggregation_id [NC] RewriteRule (.*) http://www.example.com/$1 [R=301,L] Note: I'm just winging the above (it hasn't been tested). And I'm sure JDMorgan could come up with a much more elegant solution. The solution above also assumes that the above code would get executed before any code you have implemented for triggering a 404 when a query string parameter is affected.
|
Bewenched

msg:4510276 | 10:57 pm on Oct 20, 2012 (gmt 0) |
That's fantastic! I do use a lot of rewrite... it's out our product pages are rendered. I'll definately test this out. Thanks so much. Stupid Facebook! Stupid Google! I have all the pages set with canonical tags, but never wanted someone linking with a bunch of bs on the end of it.
|
lucy24

msg:4510299 | 1:08 am on Oct 21, 2012 (gmt 0) |
Are all pages on this site html? If so, an alternative fix is to turn off :: shuffling papers :: AcceptPathInfo. It's a free-standing line in your htaccess: AcceptPathInfo Off The horse's mouth [httpd.apache.org] says: | A request will only be accepted if it maps to a literal path that exists. Therefore a request with trailing pathname information after the true filename such as /test/here.html/more in the above example will return a 404 NOT FOUND error. |
| You can only do this if there is no php or similar on your site, because dynamic pages use the extra part. The default setting-- which is officially called Default-- tells the server to ignore anything after static extensions like "html", but to retain it after dynamic extensions like "php". In any case there's absolutely no reason for them to be putting in that extra stuff. Do they think you have special php routines that do nice stuff for requests that come in with fb_blahblah queries? Are there CMSs that really do do nice stuff? Hm.
Oh yes. Option C, if the above isn't possible: RewriteCond %{QUERY_STRING} . RewriteRule ^([^.]+\.html) http://www.example.com/$1? [R=301,L]
|
Bewenched

msg:4510300 | 1:15 am on Oct 21, 2012 (gmt 0) |
It's not php, it's actually asp but we map everything to .htm files since there were old static pages with that extension. 99% of the files really don't exist... they're all done through IIS and ISAPI rewrite. Side note: Just checked FB and it appears it's only on FB pages that the link is like that. If you have one of the activity boxes on your site it's not linked that way and they resolve fine. Wonder if this is a FB "error".
|
|