I have created a projects folder inside C:\xampp\htdocs where I place all my projects, so in order to access a specific project through the url, I type this:
1. Is it possible to set the projects folder as the root folder for all my projects? So basicly when I type localhost on the url, to go by default on C:\xampp\htdocs\projects
2. In every project I try to keep the following folder structure:
- Code: Select all
-- example // name of one of my projects
--- private // contains folders with Core PHP functionality. This will not be accessible through url
---- functions, db connection, php scripts here etc etc
--- public // the public_html directory
---- index.php // the index page of my project
If I type http://localhost/projects/example I get the folder structure, instead http://localhost/projects/example/public shows the index.php page.
So basicly what I want to do is when I type http://localhost/projects/example to land me in public/index.php automaticly.
Is it possible to do these 2 things with some .htaccess files??