Skip to content

Feature: Unfurl a URL to reveal the final location #1

@andrewwoods

Description

@andrewwoods

Expected Behavior

  1. Enter a shortened URL
  2. Foreach layer of redirection, display the URL
  3. When the final layer of redirection is concluded, report that URL

Current Behavior

In many cases, running curl --location --head $url on the command line will work just fine in many cases where the redirect is done in the HTTP layer. However, when a service depends upon HTML and JS, things get more tricky.

Possible Solution

Start with a generic solution.
When a URL is compared to a list of known services that do things differently, wrap that behavior in a separate class or function.

Using GuzzleHttp will be of great help.

Context

Many sites offer a link shortening service. Some are site-specific ( e.g. https://lnkd.in/eX-UN9B6 by LinkedIn ) while others are more general purpose, like bit.ly. In either case, it would be good to take in the shortened URL, and unwrap it, until the final location is known. Then retrieve the final location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions