Cloaking url but keeping sub-urls - html

I have a dot-tk (www.dot.tk) domain that redirects to a blog of mine.
But I have a problem. If a visitor of the blog who have entered through the tk-redirection, navigates to a specific post or even follows a link that leads elsewhere, then the URL-bar doesn't change to reflect the change. It always show the tk-address only. I want sub-urls to be visible so that the visitor can copy and send the url of that post to a friend or even bookmark the specific post.
This does works well if the reader has entered the blog from the normal url.
One "solution" to this would be to put this code in the blog:
<head>
<script type="text/javascript">if (top!=self) top.location.href=self.location.href;</script>
</head>
With this code the real url will always be seen, not the tk-url, even if the visitor have entered through the tk-url.
This works, but preferably I would like to show the tk-adress AND the sub-urls, if possible.
In other words...
Instead of http://myblog.blogspot.com it should be www.myblog.tk (this works)
And instead of http://myblog.blogspot.com/blogpost5 it should be www.myblog.tk/blogpost5 (This is what I need help with, if it's possible somehow)
I hope I've made myself clear and I hope there's a solution to it.
Thanks in advance!

I think you don't want to use this redirection scheme. Instead use Blogger's custom domain name functionality.

Related

What does a form tag do behind the scene

If I want to send data back to the server from user input I know I need to use the form tag.
But why do I need the form tag, what does a form tag do behind the scenes?
I've only been in web development for less than a year, so please forgive me if my question is beginner question.
Edit: I know a form is used to denote a part of the page that is interactive and data between the from tags will be sent back to the server.
So, is the tag, just a tag, is there another piece of technology that takes the data from the page and returns the data to the server?
Edit 2: From comments and more specific web searches, I found out that the form tag is just that. A tag. It defines something on a page and does not do anything. All is okay now.
The form tag validates and with html 5 it means it doesn't call the server immediately. It can do a quick check before it attempts to post. E.g. does the email box look like an email address.
The advantage of this is it reduces costs as you're not unnecessarily calling the server. When the form thinks it looks good it will send the info to the back end.
Get and post messages are sent either getting information (reading) or it might be posting (writing).
I think that's what you're after.

URL#whatever issue with length of #tag

Here's a question i'm finding hard to answer with google and seem to be having problems with it on my site.
I am encoding/decoding user id's just to confuse matters and would like to link to parts of a page using anchors
Thing is.. My encryption is making a nice secure long string but I think there must be a limit to the length of the # anchor names because it works when its shorter, but not when its longer.
Does this seem to be true?
An example of the hash tag url is http://wgwegw.co.uk/wegweg/protected/view-game/wegweg/platform#x243j3f41684w2w2m594n416
For example i have a link:
Go to comment
When i click on it.. it opens up using HTACCESS file redirects. if i use javascript window.hash it returns the hash so i imagine the hash code is not affected by the htaccess redirects.
I land on the page: http://.co.uk//protected/view-game/*/platform#y213j3f41684w2w2m594n416
On that page in html is an anchor name: <a name="y213j3f41684w2w2m594n416"></a>
It does not skip to that part of the page?
OK here you go.
You won't believe this but I have suffixed an 'a' and now it works.
What on earth?
EDITED//
Could it be because i have an id and a name that equal the same? so i have a
<div id = "y213j3f41684w2w2m594n416">
and I have a
<a name = "y213j3f41684w2w2m594n416" />
So when i attach a to the end of the name.. it no longer is the same as the id and thus doesn't get confused?
EDITED//
If I try this on W3 example tweaks it still works so it can't be that?
Aghh now it's fixed i am desperate to know why it's working.

URLENCODE Variable in Salesforce Vertical Response Email

This is a rather simple question, but I cannot find documentation about it from Salesforce.
I am setting up an HTML Newsletter from Salesforce Vertical Response, and I need to put a link in the body of the email that goes to another site which takes the user's email address as a query string. I am doing this so that when the user clicks the link from the HTML email, they will automatically be signed up for a different blog mailing list.
The link will look like this www.mywebsite.com/blog/subscribe?email=your_email#email.com.
I can easily accomplish this by using the {EMAIL_ADDRESS} variable, such that the link looks like this:
Subsribe
This workds, but when the user gets the email and clicks the link, the '#' symbol gets stripped from the URL. Now I'm trying to figure out how to get around this. I saw some documentation on the URLENCODE() function for SalesForce, but when I try to use it in the HTML email editor in SalesForce, like URLENCODE({EMAIL_ADDRESS})it doesn't execute it, and instead interprets it literally as text. Can anyone help me? is it even possible to use functions from within the SalesForce HTML email editor?
Thanks
I havent used VerticalResponse, but if it leans on salesforce communication templates then you can always create an email template as Visualforce page. Then you can apply Encode functions to merge fields.
I'm glad you were able to find a workaround. If you ever go back to dealing with the URL, it's a good idea to disable our click-tracking when working with merge fields. This can be accomplished by adding nr_ before the http. Example: Subsribe - If you ever try that and it doesn't work, or if you have any other questions, please let us know via one of our Support channels:
support#verticalresponse.com
866-683-7842 x1
We also have live chat available: http://help.verticalresponse.com/
Regards,
Keith Gluck
VerticalResponse Customer Support

og:title doesn't correpond with the one I set

I have a question regarding the meta property in php.
I have set
and I have a list of products that need to be displayed on the first page. Whwn I click the first product and click the like button the title that appears is different from the one I set, but when I click the other products and then click like I get the correct title. I tried clearing the cache but it didn't work and I tried verifying the link using http://developers.facebook.com/tools/debug and here it teels me that the title is the one I set.
Can anyone tell me what am I doing wrong or what might be the problem? Or maybe you have a soultion for this. :D
Thanks!
Without seeing the page which is being changed and liked, it's hard to know if I am answering your question, but the information may be useful to you anyway.
The issue may be with how many likes have already added up for the page.
Note that og:title and og:type are only editable initially - after
your page receives 50 likes the title becomes fixed
Source: https://developers.facebook.com/docs/opengraphprotocol/
This has happened to me before. The easy fix/workaround I found was this: I had been appending a query string to the page URL for tracking some stats. That URL with the query string had over 50 likes. Once I changed the query string, or left it off, the page had a different amount of likes. So when I used the Facebook linter/debugger, I used the new URL and it picked up my og:title and description change.
Are you able to post a link to the page you are having this issue with?

Spoofing HTTP-request Referrer from HTML?

Is there some secret and mystical way to change the value of my HTTP-request's referer, or at the very least, keep it from showing? Also, using a MitM page from another domain would not solve my issue, as you are now just submitting that other page's value.
This is not browser specific, I would need to do this on the HTML level.
The problem I am facing is a silent-login page where it sends an HTTP-Redirect to the http-Referrer, unless it is the same domain, or empty.
You can not control this on an html level. Your only option is to modify the login code to not issue the redirect or to direct it to the desired page.
It's an old question, but I know how you can do this. The first way is not guaranteed across all browsers, but you can use rel=noreferrer. AFAIK GC is the only UA to currently support this but it is in the standard. FX may also, IDK.
The second way is far more reliable, and it involves a cool little hack someone shared with me on IRC:
Basically, construct an iframe from a base64-encoded data: URI. The framed document is to have a script that listens for a window.postMessage() and when it gets fed the command with a URL to visit, it executes window.top.location = msg.data.URI or however it is that one reads the message. Sorry I can't recall, I haven't slept for a few days.
Enjoy if you still care.. :)