Rewriting Perspective URLs

Now that Perspective is out, I’d like to shorten URLs so that end users can actually memorize them (even I can’t memorize the full URLs and I’m a developer). Specifically, I’d like to remove /data/perspective/client from the URL.

Current URL:
What I’m looking for:

I’ve done this before with sites hosted on IIS using the URL Rewrite Module, but I don’t know how to approach it in this context. Any suggestions?

1 Like

I have bookmarked a site where they suggest using NGenix as a front end to isolate Ignition from the real world and to beef up security. I haven’t done this but I was the same mind as you - turn perspective URLs into something more human friendly.

I would recommend not trying to simply eliminate the unwanted path components. Consider instead minifying the path. Your example would become:

Current URL:
Suggested Rewite:

where “dpc” is short for “data/perspective/client”. This sort of rewrite leaves access to the original URL structure.

@peter That is an interesting technical write-up that I will save for future reference… However, our installation of Ignition is not public-facing (at least for the time being).

@pturmel In our case, I don’t believe keeping the dpc keyword would be all that valuable (I might be missing something…). If users want to type out the entire path or if developers need to retrieve web resources that are mounted elsewhere, in that case, they can still type out the full URL and get what they need. My opinion is if end users need to remember the dpc tag, they may as well put in data/perspective/client. I notice that users typically find the order of data, client, and perspective confusing.

Not if you rewrite to, which seems to be what generally is attempted. If you create separate rewrite rules for each project, then yes, other URLs would still work.

I did not intend that to be literal. It could be /projects/ instead. Some short, top level name that everyone knows is the shortcut to project/page.

@pturmel I see what you mean. Thank you for that information.

What technology can I use to implement a rewrite? Would I need to spin up a web server to handle this type of behavior or is there a native way in Ignition?

The native solution (3rd party module) hooks in via module name below /data. I recommend you use a proxy/load balancer external to Ignition. (Handy for redundant Perspective deployments, too.)