Page is a not externally linkable
tweetfeeder - 4:39 pm on Sep 19, 2010 (gmt 0)
Hello,
Thanks to all who responded so promptly to my newbie question. I'm now a webmasterworld convert...
phranque wrote:
>the link to the fragment identifier should be
OK- I'll accept that the url that folk click on at Twitter has been malformed. I'll also accept that either Twitterfeed or Bit.ly has somehow created this malformed url
Nevertheless, IE8 Firefox and Opera all show these malformed URLs in the address bar.
http://www.example.com/My_Blog/post_title.html#c123456?utm_source=twitterfeed&utm_medium=twitter
But the person clicking through expecting to the read comment identified by #c123456 lands at the top of the post_title.html page and has to wade through all the other comments first. So I'd like to pass a correctly formed URL.
>the likely reason that your redirect doesn't work is that
>nothing after the hash mark is being sent with the request.
If that were the case would IE8 Firefox and Opera all show these malformed URLs in the address bar?
http://www.example.com/My_Blog/next_post_title.html#c123457?utm_source=twitterfeed&utm_medium=twitter
Apparently yes... and Spiekerooger confirmed:
>The url is actually malformed, it should be ?foo=bar#anchor :/
Does that mean that the only fixes are:-
a. use something other than twitterfeed
b. get twitterfeed to fix the problem (could take a while)
And that there is nothing at the server I can do to reconstruct the correct URL?
>search engines do not care for anchors either, so you won't
>get a dc issue here
That's good to know. Thanks.
>the problem is that most browsers do not send the URL-fragment
>identifier to the server, because named anchors are only
>processed "inside" a page -- They are handled entirely within
>the browser and there is therefore no need to send them to the
>server.
So, if I understand you both and later also jdMorgan correctly IE8 Firefox and Opera all show these malformed URLs in the address bar
http://www.example.com/My_Blog/more_posts_.html#c123458?utm_source=twitterfeed&utm_medium=twitter
but my server is not actually seeing anything more than:-
http://www.example.com/My_Blog/more_posts_.html
I wonder if that means that each new comment automatically fed to Twitter for...
http://www.example.com/My_Blog/more_posts_.html
will be seen as spam by Twitter or Google et al? That would be a pity as I thought feeding comments would liven up and make my Twitter page more relevant.
jdMorgan also wrote:
>if you still want to include them in the redirect path for
>those few browsers that do send them
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /My_Blog/mypage\.html(\?[^#\ ]*)?(#[^\ ]*)?\ HTTP/
RewriteRule ^My_Blog/mypage\.html$ http://www.example.com/My_Blog/mypage.html%2? [R=301,L]
I guess there is little point pursuing this, unless there is any chance that a variation of your code would actually fix the problem for the majority.
I tested that. I just hard coded that for a specific blog post page on a different blog.
It did not work in removing the query string in my first test.
It also failed on my second test to redirect to another page which I inserted at test.com to see if anything was happening at all.
So there was no use me hoping you might be wrong, and that this might be a magic fix.
Thanks again, maybe I'll see if Feedburner can pass a correctly formed URL, and then I'll presumably need different code again?