I am developing a custom WordPress plugin for a site. The basic goal of the plugin is a gallery of sorts with user uploads. There's quite a bit more to it than that obviously but that should paint the picture good enough.
I already have the administrator side complete. I am now looking at the best way to do the front end. My plugin will have a 'homepage' and hundreds of different gallery pages with hundreds of thousands of files. Example URLs of these pages:
What is the best way to get WP to not 404 these URLs and instead pass them off to my plugin? Additionally, what would be the best way to compile these pages output, keeping in mind I still want to utilize the theme's header, footer, and general layout of course.