Moodle installation - change default home page from index.php to index.html

Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -
Number of replies: 14

I installed moodle at domain (under public_html). When i browse the url, I get the default moodle page as the home page. I need to have a different home page - a customised one, with ABOUT US, CONTACT US, SHOP, etc. I tried putting up a "index.html", but didn't work.

Using moodle ver. 2.6

Average of ratings: -
In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Usman Asar -
Picture of Plugin developers Picture of Testers

Mithil, this is where you make changes in your web server's default page settings, as every web server has these settings of opening web pages in order, so for example if you have mentioned pages to be opened like (in order)

index.html

default.html

index.php

So your web server  will look out for index.html page first, failing to find it will look for default.html, failing there it will look out for index.php to open as first page, now for example if you have another page like index.asp and you want to open that as default and have not mentioned in default page list, it simply will be ignored as its not in the default page list in firs place.

In reply to Usman Asar

Re: Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -

Hi Usman

Thanks, but I already tried index.html. Issue is that the site loads with index.html (default), which has a login link to moodle (linked to index.php). But, after logging in, I'm taken back AGAIN to index.html.

I've been told that the only choice(s) I have is either to use a theme, or re-install in a sub-domain. I'm against themes, as this site would also be accessible through smartphones, mobiles, etc. So, I guess i WILL have to do a reinstall.

Any thoughts??


Thanks a lot.

Mithil

In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Usman Asar -
Picture of Plugin developers Picture of Testers

I see, so you have installed Moodle on root? which plenty others do, but its always recommended NOT to, and keeping moodle in its own sub-folder, so in case if you are adding more applications (Like WordPress, Forums, Wiki, Mahara) then it will be much easier to manage each application, rather than managing different folders on Root.

Using a theme is recommended that will bring the WOW effect to your website, like Emma mentioned, you can always make a customisable page out of Moodle own theme and there are plenty of wonderful themes to start with, like Essential, Elegance, BCU to name a few. 

You dont have to do a re-install, just move contents of your Root folder (all moodle sub folders) into a sub folder like moodle/lms, and go into config.php and change the address, say for example before you had address like "http://www.mymoodle.com" now you'll be adding sub-folder to it, like "http://www.mymoodle.com/moodle"

and in your .htaccess file, just do the 301 redirect to your Moodle. even in this case if you want to add landing page of static content, it would be outside of that moodle folder on to root folder, this way if someone clicks HOME link in Moodle, they will stay on Moodle, though you can always give extra link to your site's landing page.

However, as Emma mentioned, you can achieve all that (static links, about us, mail us etc etc), using any of the Moodle Themes.

In reply to Usman Asar

Re: Moodle installation - change default home page from index.php to index.html

by Just H -

"I see, so you have installed Moodle on root? which plenty others do, but its always recommended NOT to..."

Recommended by whom and where? Can't say I can remember ever reading/hearing that before in the past decade of using Moodle.

In reply to Just H

Re: Moodle installation - change default home page from index.php to index.html

by Usman Asar -
Picture of Plugin developers Picture of Testers

I've learnt the hard way, that is why always recommend installing moodle in its own sub-folder making it more manageable. If you have a better way to manage other CMS's, External forums and blogs under same domain, I'll be happy taking inputs.

In reply to Usman Asar

Re: Moodle installation - change default home page from index.php to index.html

by Just H -

OK, I see where you're coming from now. It's a personal preference/recommendation rather than an official recommendation which is the way I read your post due to the cap "NOT". By capping it like that people new to Moodle/web will think it's an official recommendation which for a basic standalone Moodle install, IMHO, just makes it more confusing and leads to more questions re redirects "I've installed Moodle but I want people to go to it when they type in mysite.com but it's in mysite.com/moodle" sort of thing.

As for other ways to manage other scripts under the same domain it comes down to the resources you have available and the type of hosting plan you have (i.e. how many sites you are able to set up) and what you want to do (see next point).

I personally prefer "subdomains" (in my case, I have a dedicated server, they are distinct separate sites with distinct cPanel access); the downside of subdomains is they are treated as separate sites so could cause extra work e.g. if relying on javascript or cookies for communicating between different sites.


Average of ratings: Useful (1)
In reply to Usman Asar

Re: Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -

Thanks Usman, for your inputs. Shall try moving the contents. An ex-colleague here also suggested installing it to a sub-folder, so that it'd be easier to manage other applications.

Thanks a lot. Closing the conversation now.


Regards

Mithil
In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

This is what I do.  I have my own homepage, and then on it I provide a link to my moodle, which is in a sub-folder.  This is essentially what Usman has recommended, just in case you decide to install other applications on your server.  Install each application in its own folder. 

I think it might also make it easier when it comes time to upgrade your moodle.

Average of ratings: Useful (1)
In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You can also customize the Moodle frontpage considerably and add everything you want.  Look at themes like Essential or Elegance for ideas.

In reply to Emma Richardson

Re: Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -

Hi Emma

Thanks for the suggestion, but I've had an unpleasant experience with responsive themes on different handhelds (smartphones, tablets, etc). Also, the latest moodle-mobile app doesn't cater to quizzes.

Any suggestions, besides re-installing to a sub-domain??


Thanks

Mithil

In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you thought about upgrading?  2.7 onwards are much more mobile friendly and designed responsively. 

You can still use labels and html blocks to make the older themes/install look close to how you want them - it is always simpler if you can work with what you have.

In reply to Emma Richardson

Re: Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -

Thanks a lot Emma for your suggestions. Actually, I DID fall for the themes, but the version installed is 2.6. Well, I'll continue with the default theme for now, and later, when I upgrade, I'll try those.

Thanks a lot. Closing the conversation now.


Regards

Mithil

In reply to Mithil Sharma

Re: Moodle installation - change default home page from index.php to index.html

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Emma is right about the newer responsive themes.  I am using "MORE", have added some CSS, and both I and my students really like how it runs from a smartphone.  When it is time for you to update your moodle, make sure to experiment first.  I recall that I was surprised by some of the changes, and had to work a little to understand all of the new features.  But it was very worthwhile and I am now enjoying MORE.

In reply to Rick Jerz

Re: Moodle installation - change default home page from index.php to index.html

by Mithil Sharma -

Thanks Rick, I'll surely explore this theme once I upgrade!!