Dynamic Changing URL (Link Redirector) Service? - url

I wanted to see if there is a service out there that can dynamically change a URL
Ex. If I wanted someone to go to a landing page like www.handsomeman2015.com/landing2015 and I used a link shortner like bit.ly so I would provide the URL like bit.ly/ag95g and it would direct customers to
But I want to be able to change the URL extension to landing2016, landing2017 etc without changing the web link, is this possible?
Sorry if my question isn't using the correct terminology, as I'm a bit new to this stuff.

Linkredirector is a dynamic URL shortener that lets you change the destination URLs of your links. As long as you register an account you can login and edit your links.
Disclaimer, I work at Linkredirector.

Yourls seems to be an interesting option, if you don't mind installing the service on your own website. Additionally, tiny.cc seems to allow you to change the link through their API.

Related

Shorten URL in Swift iOS with your custom website domain name

I want to shorten a share URL I have in my app when users share a shop. I want a methodology or an API that allows me to shorten the URL to make it look clean but with my website's name.
for instance:
longURL: "https://example.com?x=somevalue&y=someothervalues"
Then when I shorten the URL with an API or method it would produce a small URL similar to this: "https://mywebsite.com/shortenedURLcode"
here is my code:
link = URL(string: "https://mywebsitename.com/share/?shop="+concatenate(getKey!,"&title="+shopName.text!.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!,"&desc="+summary.text!.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!,"&img="+profileImgURL))
I want to shorten the above link with my website's hostname.
How can I do that?
Here are two options to consider for shortening your URLs:
Bitly API
One option Bitly's API, which will allow you to make requests that return shortened links that fit the above mentioned criteria.
It appears to achieve the result you seek, you must make two requests: one to receive the link with custom domain, and a second to customize the "back half" (See revenant API Documentation in hyperlinked text).
The result of request #2 will contain your fully custom link.
Rebrandly API
The far better option in my opinion is Rebrandly. While I personally don't have any experience using any of Rebrandly's products, I would recommend this option as it has a generous free tier to get you started.
And best of all, the entire shortened link can be formulated in a single request. Will note that what Bitly calls a "back-half" is referred to as the "slashtag" by Rebrandly, but these terms both refer to the exact same thing.
API documentation can be found here.

Twitter Card Validator - Link to specific URL

I would like to give someone a link to check how a URL would look on a Twitter card. Currently, I send them to https://cards-dev.twitter.com/validator and ask them to type in the URL. It would be more convenient to simply give a link that auto adds their URL.
Like this example:
https://cards-dev.twitter.com/validator?url=https://google.com
Any way to do this?
The Twitter cards validator does not support having URLs passed in like that, so unfortunately this is still a two step process.

Canonical URL formatting issue causes Facebook to interpret mobile URL as a different URL

I need to format this canonical URL and I cant figure out how! I've looked around the web and this site a lot and I've realized that I need a specific answer.
Problem Description:
My BLOG's desktop view has (say) URL: www.x.com/page.html
The same page in mobile view URL would be: www.x.com/page.html?m=1
Its all good and dandy to this point, but the problem comes when I use facebook comments with this. It parses url based on this: www.x.com/page.html
So, it is identifying ?m=1 in the end of the first URL as an entirely different URL.
i.e
It is treating those two URL as different
Both of them are URL for the same page and I want them to be treated the same
Could anyone provide me a way to check if the loading page is ?m=1 and if it is ?m=1 then remove the ?m=1 when sending it to facebook?
I WOULD GREATLY APPRECIATE IT IF THE SOLUTION IS INLINE if it is not inline, oh well, I just need a solution right now.
Current code snippet used is this:
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Let me break the question into small parts(incase someone is not a native speaker and wants to help/learn about this problem)
I want to detect if the loading page has ?m=1 in its URL or not. The canonical URL for this is data:post.url applied as
expr:href='data:post.url'
If a ?m=1 is detected from data:post.URL , I want to remove it and send the remaining URL into expr:href= so that both my URLs
are identified the same when my website displays facebook comments.
Click the image link below to look at this image please. This is the same URL but the
comments are being sent to me as if they're from different URLs. I
want them to appear under the same thread.
This is it--> http://i.stack.imgur.com/M7fK2.png
I haven't found this particular answer anywhere and I am hopeful that
some creative solutions will pop out in this site!
In your code
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Use data:post.canonicalUrl instead of data:post.url
This is the Blogger's layout tag for getting the Canonical URL of a blog post (This will always default to the blogspot.com domain, so there won't be ccTLD issues as well)

Can you put a hyperlink in a UIActivityItemProvider?

I have a huge link. I want to share this link when a user in my app posts to facebook from within the app. However my link is too large so I'd like to shorten it. Is there anyway (natively) I could have something like "Download the app HERE" where HERE redirects to my super long link?
What you're looking to do really can't be done with UIActivityViewController since each service has a completely different mechanism for encoding/representing links. Your best is probably to use some kind of URL shortening service such as Google's

How to create url_shortner in ruby

I am developing a web application in which I have implemented Facebook and Twitter connectivity.I want to shorten the url when user post to facebook or twitter from my apllication.
For example if url is http://www.MyDomain.com/user/234545 then it should be somwthing like http://M.D/n2b
How can I do that. Please help & also please give me more info about how actually the url shorter works and how to implement it in rails
For starters, you would need to purchase the "M.D" domain, and I don't even think that exists. So your next option would be to use a subdomain of your "MyDomain.com", like "short.MyDomain.com" and stick a Rails app there that could map your shorter URLs. Ironically, the URL would be nearly as long.
It wouldn't surprise me if some of the URL shorteners already out there have some kind of HTTP API. If so, you're probably better off using them.
use bitly or tinyurl or you can create your own method for shorten url if you are using your own method then you cannot change the domain name you have to use some sort of API for doing this.

Resources