I was wondering if anyone had any experience in installing Moodle to a server that already had a CraftCMS website installed onto it? I've followed the instructions on the Moodle Installation Guide (I put the Moodle files in the CraftCMS template folder) but when I get to the part where I go to http://domain/moodle to install it I get a 404 error. If I go to http://domain/moodle/install.php I get the install file but it doesn't work, I just get a string of text like the PHP isn't executing. I can't find any similar issue's on Moodle's forums so I think that this will have something to do with craft not allowing the PHP?
-
1I don't have a specific answer, but what I think you need is something within the .htaccess file that looks for anything that is moodle specific. By default, the .htaccess file is sending all requests through the index file (which is Craft) so Craft is trying to interpret your Moodle requests. Which, it has no idea what to do with. Maybe something like this? coolestguidesontheplanet.com/…– DamonCommented Sep 21, 2015 at 13:56
Add a comment
|
1 Answer
What Damon said is correct. You'll need to modify Craft's public .htaccess
file so that all requests to Moodle URIs go to it's public index.php
file and requests to Craft URIs go to Craft's public index.php
file.
Alternatively, you could keep them as two separate installations, which simplifies things.
-
I've moved Moodle (student-portal) out of the templates folder and into the base site directly under public_html. It worked but only if I use a specific address like domain/student-work/index.php. After installation though moodle tries to link to other pages like "domain.com/home/database/public_html/student-portal/my" and I get another 404 error through craft. Is this still a htaccess problem? I'm not sure what code I am looking to change or add even with the site above as I have little experience in modifying the .htaccess files of a website. Commented Sep 23, 2015 at 6:37