By itayperry91
I have a few different projects and all of them are set in /var/www/html folder. Each one has its own folder. That’s what I wrote in my virtual host to activate all of them:
<VirtualHost *:80>
.
.
DocumentRoot /var/www/html/
.
.
</VirtualHost>
One of my projects has routes in it - it’s written in PHP using Slim micro framework.
The project is in var/www/html/school folder.
This is my .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
All of the routers are at routers.php that is required in index.php and they don’t work: could you help me?
That’s the website: http://www.itayperry.com/school/login The login page is the only one that works - I’ve tried adding the word ‘/school’ to every router in my routers.php file but this does’nt work.
I know that if I change my DocumentRoot to /var/www/html/school the project will work perfectly but then all other projects will stop working.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.