I have built a custom stripe payment integration.
The WP site is at root level of domain/public_html
The payment integration is accessed under domain.com/payment/
The integration is programmed to call wp-load which allows me to create the integration as if it was a native page.
at the start my structure was very simple. index.php called everything from a top level includes folder, this became messy and problematic very fast. The old structure basically used htaccess to rewrite the filepaths by removing .php extensions and by putting an index.php in each directory to give the proper /directory/ look in the URL
Now I have created a better structure a sample can be found below:
/vendor (composer files)
Can someone advise me the best way to make “pretty urls” for this.
I would like everything to now run from the index.php at the top of /payment/ which loads my headers etc and then includes a pages.php page or performs the logic within index.php
I am struggling to properly create URLs so that I can have links like WordPress with pretty URLS
I would like the links and URLs to read as /payment/something/here/
the files in the /pages directory are all front end stuff to show the user
the files /process directory are things like the file that processes the info submitted to the form. So the initial payment/index.php will submit the form to /process/file.php and then redirect to hopefully a thank you page under /pages/thankyou/file.php
Read more here:: Building a custom app and making friendly URLs