I'm building a plugin that'll use custom slugs to essentially create a URL shortener.
Right now I've got a new table that'll house the slugs so that when someone goes to, say, domain.com/xyz, I need to be able to look up xyz in the table to see if it exists.
If so, my plugin will run a particular function.
I've got everything I need created except one bit...
How to get the slug.
The problem is, if you go to domain.com/xyz, it'll load a 404 page.
I may need to rework everything I've got to create a custom post type, but I'm not sure if that's the best solution.
Is there a common practice for something like this?
Thanks in advance for your help!