Suddenly. a million questions

Suddenly. a million questions

by Mark Sevi -
Number of replies: 10
Sorry - another question.

I have an index.html page (portal) that precedes that index.php page. I needed it so we could do some pre-marketing on the site that people could see instead of the moodle installation which is handling the entry back office stuff.

I just figured out that if I set the default name of the site to be occinemarts.com/index.php instead of just occinemaarts.com then every time the installation wants to go to the "root" page it'll go to the index.php instead of the index.html page which is what happens now.

Since server default is to go to html before php, the index.html page works well initially when we send people to the site, but everytime I click on something that sends it back to www.occinemaarts.com, I'm back at the html page and not the php page where I should be.

So...where is the name of the site that is provided to the lib pages stored? If I can change that I can avoid all the switching that is driving me nuts.

Appreciate your help,
Mark
Average of ratings: -
In reply to Mark Sevi

Re: Suddenly. a million questions

by John Andrewartha -
Hi Mark,
Quick and simple fix. I hope!
On the Moodle edit the front page to include the page or pages you are using as a Welcome.
Much the same way we do for new features and "I want to tell you all about it."
You can have a look at my example at http://www.dorset.org.au/moodle
Click the link in the top left and a popup appears telling you about our LAMS server.

I hope this is of help.
John
In reply to John Andrewartha

Re: Suddenly. a million questions

by Mark Sevi -
Thank you - interesting solution. Don't think it works for me, though. I need a portal page that people can visit before they get to the site.

www.occinemaarts.com - will show you what I mean. The first page is an index.html page that I built outside the installation. I just called it index.html. The page you go to when you click REGISTER or LOGIN is the normal portal page, index.php.

During site naviagation, because the designers just used the default as a destination in some places, my site now goes back to the index.html page instead of the index.php page it should. If I could just edit the default site to be occinemaearts.com/index.php instead of occinemaarts.com, that would solve the issue.

Thanks again,
Mark
In reply to Mark Sevi

Re: Suddenly. a million questions

by Mark Sevi -
Well, I changed the root in config.php and of course everything crashed. It doesn't work because the pages are appended to the root. If the root is occinemaarts.com/index.php then that becomes occinemaarts.com/index.php/.

Shrug. It was an intersting thought. Maybe there's a similar way around it. Anyone?

Thanks,
Mark
In reply to Mark Sevi

Re: Suddenly. a million questions

by John Andrewartha -
Hi Mark,
Your problem is the address space most sites, not all have a separate portal page outside the moodle space.

You may need to do something like
portal www.occinemaarts.com which goes to http://www.occinemaarts.com/data/index.html for example.

Move Moodle into its own space and a small change to your portal page to give a link to contest. IE http://www.occinemaarts.com/moodle

If you are using Apache it is mostly easy just do some aliasing, Apache looks at the default location first for a index.html,php.. in Unix that is something like /usr/local/www/apacha22/data for the Apache2.2* install on other OS it will be different.

That should keep it sane as the contest will have a advertised URL of http://www.occinemaarts.com/ and all your links from the portal point to the Moodle.

I hope that ,make sence.
John
In reply to John Andrewartha

Re: Suddenly. a million questions

by Mark Sevi -
John,

It does make sense - but I don't think it'll work.

The breadcrumbs still point to http://occinemarts.com - that would get right back to the index.html page, right? Same problem.

Am I missing what you're saying?

Not sure I understand what the aliasing had to do with your solution. Any aliasing would do the same thing, no?

Sorry -
Mark
In reply to Mark Sevi

Re: Suddenly. a million questions

by John Andrewartha -
OK Mary,
My poor language, I shall try to do better.
All web servers have a document root. That's the default place they look when a request is first received.
You appear to have placed you Moodle as the root. Did you by chance remove the first level or moodle root directory?
The structure should be document_root/moodle/......
Or you may have configured the server by telling it that it's root is in the moodle directory if you are using Apache then you would have made the wrong config in the httpd.config.

Please tell me what webserver you are using if it's Apache I can give you some sample configs to use.

You need to break the whole portal exercise into 2 parts, (a) the Portal and (b) the moodle you do that by telling your web server what to do for what call.
I.E. www.your.server.com gives the Portal page
www.your.server.com/moodle goes straight in to the moddle front page.

The Portal then becomes a gateway but not the only way.
John
In reply to John Andrewartha

Re: Suddenly. a million questions

by Mark Sevi -
John,

I'm using 1and1.com (all Linux hosting) running Apache.

The directory structure is typical, with the Moodle site running as root in its own folder. It is not running as "the root." That's www.visionstrike.com, my web company's one page site. In other words, there is more than one site in this particular hosting since 1and1 allows for me to buy one hosting plan but put many sites in it, all running as root (maybe I'm not saying that correctly but the effect is the same.) OCCinemaArts and OCScreenwriters are my not-for-profit sites within that hosting.

I'm sorry for being so obtuse but I still don't see how changing the installation to something like occinemaarts.com/moodle is going to change the *breadcrumbs* within Moodle.

When you click on the course (the contest) within Moodle, since Moodle wants http://sitename.com it will go to http://sitename.com which is already being delivered as sitename.com/index.html. The HTML page is being served first, as Apache is supposed to do. When people go to the site, the first page they see is not the Moodle page (index.php) but the index.html page that I created - that's really not the problem. Once inside Moodle is where things go wrong for me.

Sorry if I'm not making this clear or being obstuse - I don't know all that much about servers although I've worked with them for years as a web dev.

Mark
In reply to Mark Sevi

Re: Suddenly. a million questions

by John Andrewartha -
Hi Mark,
Lets try and declutter this a bit.
You have a modified moodle running on a host site.
Currently the moodle handles everything front page the lot.
You did this by placing the index.html file in the top moodle directory.
Now every time some one hits the site they have to deal first with the index page first when you would prefer only once.
Assuming that the index.html is info only not conditional branching to get to the contest. We have it would appear to have to move the index.html file out of the way.
However the client or potential contestants have no way then of reading all about it.

Solution move the index.html into the document_root and place a link to the contest in it. Most users get the idea after a few hits to book mark the login page as that is where they are going.
Just make sure that the moodle is a subdirectory under the document_root.
I have looked at the site and did a www.your.site.com/moodle but I got the 404 error "not found."
The graphic should look like
/var/www/[sitename] this is where the index.html file should live. (document_root)
we then have /var/www/[sitename]/moodle moodle is a subdirectory. (moodle root)
John
In reply to John Andrewartha

Re: Suddenly. a million questions

by Mark Sevi -
John,

Appreciate your efforts and patience. I did understand your solution - put the Moodle installation into a subdirectory so when people come to the site they come to the index.html page first and then link to the subdirectory with the index.php page.

Here's the issue that I don't think I'm communicating to you:

Once the contestants are *inside* the installation, the navigation breadcrumb at the top then points at http://occinemaarts.com - that's the address I get when I roll over the breadcrumb.

Given that, I'm back to square one because it isn't searching for the index.php page but rather the www.occinemaarts.com which will bring up the index.html page - right?

Before I move the installation and have to deal with whatever fallout that might entail, I need to be sure your solution is going to solve this problem or I just don't want to mess with it.

If this is getting too tedious then thanks - I'll muddle (moodle) through. smile

Mark
In reply to Mark Sevi

Re: Suddenly. a million questions

by John Andrewartha -
Before you do anything make an archive.. Just zip the lot and hang on to it.
If it does not work restore.

You are probably not using "breadcrumbs in the index page so it should work.

Its not tedious that's what forums like this are for. We all learn something about Life Long Learning I think.

John