Note that there are some explanatory texts on larger screens.

plurals
  1. POHelp with bootstrap and regex for PHP
    primarykey
    data
    text
    <p>I am working on a new PHP framework for personal use in future projects, and below is my planned file structure so far. I just need some help with some regex for my .htaccess file and some help for how I can load the files I want.</p> <p>Basically, any "folder" after the domain should load from my "module" folder. I would like to have it load <strong>www.domain.com/account/</strong> from <strong>www.domain.com/module/account/</strong>. I also want it in that format for any other folder I have under modules. All folders/files under "module" should load as if it were in the top level.</p> <p>In this example though in my module/account/ folder, if I have a file called home.php then I should be able to access it with <strong>www.domain.com/account/home</strong> instead of <strong>www.domain.com/module/account/home.php</strong>, and <strong>www.domain.com/module/user/register.php</strong> would actually be accessed by <strong>www.domain.com/user/register</strong></p> <p>I hope this makes sense and appreciate any help and any advice. I mainly need help with the .htaccess file to make this folder structure work. I have not decided if all files should be accessed though a single index file or if I should just include a bootstrap type file into every page. The bootstrap file would set up all variables, config options, as well as auto load all class files and create objects needed. </p> <pre><code>myFramework/ --/assets/ --------/css/ --------/images/ --------/javascript/ --/includes/ ---------/classes/ ---------/config/ ---------/language/ ---------/header.php ---------/footer.php --/module/ --------/account/ ----------------/create.php ----------------/login.php ----------------/logout.php ----------------/settings.php ----------------/editprofile.php --------/admin/ --------/blog/ --------/forums/ --------/messages/ --------/users/ --index.php </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload