1 of 2
1
index.php location
Posted: 26 May 2008 12:47 PM   [ Ignore ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

I am new to expression engine and have just installed it in a sub directory.

My main site is www.annejackson.ca.  I have in my file manager annejackson.ca/public_html/annejackson/index.php.

I have multiple sites underneath this public_html all working fine with index.html or index.php in their respective subdirectories.

3 questions -
1) as the main site is annejackson.ca am I in the wrong location for the index file because it is the root account for all my accounts?

2)  I have something in the index.php file but nothing shows up and the path in my bar is
http://www.annejackson.ca/annejackson/index.php/anne/index/

root directory of the site in expression engine is http://www.annejackson.ca/annejackson/
control panel is http://www.annejackson.ca/annejackson/EE/eesource/***/index.php.
The installation is http://www.annejackson.ca/annejackson/EE/eesource… etcetera.

3)  when you say that index.php can be in any directory - im fine with that, but how does it know to render the index.php when you try and go to www.annejackson.ca etc?

Thanks

Note: redacted out the name of your system directoy for security reasons.

Profile
 
 
Posted: 26 May 2008 01:06 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004
Anne Jackson - 26 May 2008 12:47 PM

I am new to expression engine and have just installed it in a sub directory.

Kind of, I’d say. You have attempted to install it at http://www.annejackson.ca/annejackson/EE/eesource/, but the index.php is actually missing. Put your index.php there.

when you say that index.php can be in any directory - im fine with that, but how does it know to render the index.php when you try and go to www.annejackson.ca etc?

You need to bring up the URL containing the index.php in your browser. I would actually recommend to install it directly in annejackson.ca/public_html.  You are currently showing a list of subdirectories, which I consider a minor security issue.

Moving to Installation.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 26 May 2008 04:44 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

Hi.  I actually have other sites so cant put it into the public_html…there must also be other people who dont only have 1 site being used in the public_html.

You say you need to bring the URL containing the index in your browser, but how can people know what the URL path is?  When you put in www.expressionengine.com, you dont put in www.expressionengine.com/ee/source/index.php, people would not know what the path was nor would they take the time to learn it.  I am thinking that there is some kind of re-direction going on, but could not find anything in the documentation on this.

Profile
 
 
Posted: 26 May 2008 06:12 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12374
Joined  04-29-2002

Anne, when you go to http://www.eehowto.com You are taken to my wiki page.

I set it up that way so that I could take people somewhere they’d get content, instead of going to my regular site (which *still* isn’t finished).

I have my index.php file located in my public_html folder. This site also hosts three other MSM sites.

In EE, I determine which template is the default template the drives the site.

You also set the URL to the root directory of your site and the Name of your site’s index page

In my case, the values are:

http://www.eehowto.com
and blank.

In many cases, the Name of your site’s index page will be index.php. I don’t have it in there because I have removed index.php from my urls via .htaccess.

So how is what I do different than what you want to do?

Image Attachments
defaultgroup.jpg
Click thumbnail to see full-size image
 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 27 May 2008 02:17 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004
Anne Jackson - 26 May 2008 04:44 PM

I actually have other sites so cant put it into the public_html…there must also be other people who dont only have 1 site being used in the public_html.

Actually, you could. I, too, have more than one site setup on some of my accounts. Do not confuse “hosting account” with “domain”. annejackson.ca currently points to your “public_html” directory (and shows the underlying directoy structure, which is probably not a good idea). Just to give you an example: You have a directory named samsheardown.com in there as well. And while you could access that as

http://annejackson.ca/samsheardown.com/

you probably use samsheardown.com in daily use. The same goes for the other sites. You could easily install EE in the root of your account, and use http://annejackson.ca as your main site. This would in no way affect the other sites, which are setup in subdirectories off your main public_html.

You say you need to bring the URL containing the index in your browser, but how can people know what the URL path is?

Obviously, they can’t, so you need to map the domain name to the appropriate directory in your account. How would people know that the “Printchicks” site lives at

http://annejackson.ca/printchicks/

They wouldn’t, and there is no need to, because printchicks.com is mapped correctly to this directory.

I am thinking that there is some kind of re-direction going on, but could not find anything in the documentation on this.

It’s simply how you setup your domains and your hosting. We’re happy to help as good as we can, but it’s not an EE thing, as such.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 27 May 2008 01:42 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

So to recap in my own words…
The index.php needs to be in the root directory of public_html.
Expression engine will know it as such as the template default group has an asterick by index.php.  (I take it that for expression engine it can be called anything, but not going to dabble with that right now!)
I will also need to put in the admin>>general configuration section:
URL to the root of the directory of your site…..as http:\\www.annejackson.ca\ only and the URL to the control panel index page can remain the default going to the multiple layered path ending up under the source and system subdirectoris?

Thanks so much

Profile
 
 
Posted: 27 May 2008 01:50 PM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004
Anne Jackson - 27 May 2008 01:42 PM

The index.php needs to be in the root directory of public_html.

In your case, yes, I believe so. Otherwise, if you have it in a sub-directory you would need to put that sub-directory in the URL at all times; clearly not what we want.

Expression engine will know it as such as the template default group has an asterick by index.php.

Sorry, you lost me there. If you install EE in public_html, you will run EE’s index.php every time you bring up annejackson.ca in a browser. EE will then display the default template in the default template group, unless you specify something else in the URL.

Well, just make a backup of everything on your server and install EE into your public_html directory.

... and the URL to the control panel index page can remain the default going to the multiple layered path ending up under the source and system subdirectoris?

No. If you install EE into public_html, and, consequently, can access it at annejackson.ca, your control panel will be located at http://annejackson.ca/system/, although you will be ginve the option to rename system to something else.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 May 2008 07:00 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

I really want to develop sites in EE and need to know the relationships here so please bear with me as I need to understand.
So let me approach this from a a different angle…re-installing it will work Im sure, but what about the case when you have an existing site that you want to re-design in expression engine.
You install EE in a subdirectory to develop your new site and when you are ready to publish your new site,you want to move it into public_html to display your new site and get rid of the old one. You would normally just rename or replace the old index with the new one and your new site will appear.
The relationship between ee’s index.php and how it knows what to publish (you can call index.php whatever you want apparently, presuming that it is the home page within ee you can call whatever you want, but index.php as installed must be in public directory)  So does index.php hold the information to re-direct to the “home page” and does it gets that information from the settings in admin>>systempreferences>>general configuration?
Thanks so much.

Profile
 
 
Posted: 28 May 2008 07:15 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004
Anne Jackson - 28 May 2008 07:00 AM

So let me approach this from a a different angle…re-installing it will work Im sure, but what about the case when you have an existing site that you want to re-design in expression engine.

You can certainly do that. Some prefer to develop on a seaprate site, some install EE on the same site and develop the new site there, leaving the old one untouched. for the time being. I have done it on numerous occasions.

You install EE in a subdirectory to develop your new site and when you are ready to publish your new site,you want to move it into public_html to display your new site and get rid of the old one. You would normally just rename or replace the old index with the new one and your new site will appear.

That would work as well, yes. You’ll actually have to move EE then, though, which means a few additional settings and configurations that could be avoided.

The relationship between ee’s index.php and how it knows what to publish (you can call index.php whatever you want apparently, presuming that it is the home page within ee you can call whatever you want, but index.php as installed must be in public directory)

index.php must be in a publicly acessible directory, but not necessarily the top most one.

So does index.php hold the information to re-direct to the “home page” and does it gets that information from the settings in admin>>systempreferences>>general configuration?

index.php is the central file of EE. Every request to EE is routed through it, and the rest of the URL determines what content EE will show. I don’t understand you question about redirecting to the homepage.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 May 2008 07:26 AM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

So you actually have to move EE then,  in the case that you install it in a different subdirectory.  I think this is the heart of my dilemma. 
What exactly do you need to move?
If I re-install is it a simple as deleting the whole EE andre-installing (Can I still use the ee database or does that also need to be deleted and re-created?)
Thanks for sticking with this with me!

Profile
 
 
Posted: 28 May 2008 07:44 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

Yes, you would have to move EE. What exactly? All the files that come with it: index.php and path.php from the main directory, as well as the directories “images”, “themes” and “system”.

If you simply re-install in the same location, EE will detect the previous installation and ask you to manually remove a lock flag before proceeding. If you install in a new directory, but provide the old db info, EE will overwrite that. No need to delete your database first.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 May 2008 07:52 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

So then each time I make a new site in EE in a subdirectory, to move it over upon completion of the new site, I will have to move the index.php and path.php from the main directory, as well as the directories “images”, “themes” and “system”?

Profile
 
 
Posted: 28 May 2008 08:21 AM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

If you don’t want to access EE via that subdirectory you will have to move the files, yes.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 May 2008 08:24 AM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

I am happy keeping EE in the subdirectory and not moving things….how do I do that?

Profile
 
 
Posted: 28 May 2008 08:27 AM   [ Ignore ]   [ # 14 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

Why, you access your installation via that subdirectory, then:

http://example.com/your_ee/index.php

Well, there are other ways, but I really think they’d be slightly too advanced at this stage.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 28 May 2008 08:33 AM   [ Ignore ]   [ # 15 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

So I am back to where i started then that how does the “internet” know that when they click on www.annejackson.ca, where my index.php for EE is?

Profile
 
 
Posted: 28 May 2008 09:22 AM   [ Ignore ]   [ # 16 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

The thread got kind of long and so now I am confused.  But it boils down to- all EE templates are called up via the index.php file.  You can put the system folder wherever you like below public_html- and you can put the index.php and path.php files wherever you like below public_html.  As long as you set the path to the system folder correctly in path.php?  You can put the files/folders wherever you like.

Wherever you put index.php and path.php?  The full url to bring up the EE content is going to be http://whatever.com/you/want/index.php.

All EE templates go through that index.php file.

Now- the reason you can have a site pull up EE content using just http://mysite.com/ - with no index.php in there?  By default, something is served up.  Usually it’s an index.html file.  If there is no index.html?  It will pull up the index.php file.  (Simplifying and it may vary.) 

To specify WHAT template EE delivers when there is no template group indicator in the url- you set a default template goup.  The index template from that template group will be served up by default.  Usually this is the site template group.

So- if you have a path.php and index.php in public_html:
mysite.com
mysite.com/index.php
mysite.com/index.php/site
mysite.com/index.php/site/index
Will all server the same content.  You may want to skim over the docs on understanding EE urls- it helps clarify things a bit.

And- if this is all just a big confusing muddle right now, it may be because you’re like me, and understand things best when you actually see them in action.  If that’s the case, let’s break it down simple.  What is your goal right now- and how is the current setup not working?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 28 May 2008 09:32 AM   [ Ignore ]   [ # 17 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

Hi Anne.

Let’s take a step back here.  Whenever a directory is loaded, the webserver looks for an index.php or index.html in that directory and loads it.  So if you have EE (with its respective index.php and files) in a subdirectory, the internet at large will only load EE if they visit your site and subdirectory.

We can get you through this no problem.  Are you wanting EE to be installed so that when someone visits annejackson.ca they hit your EE installation, or are you wanting your EE installation to be totally separate?

If you want it to be totally separate for now, but then once you’re happy with it to move it to your main domain, we can do that also.  Here’s how;

1) Put all of the contents of EE into your subdirectory via FTP.
2) Make sure you have a blank database for it to use
3) Install EE as per normal.  When it asks you what your URL is, you’ll put http://www.annejackson.ca/subdirectory
4) Build your site as per normal.

When you’re ready to move it over, what you’ll do are move the files out of the subdirectory and onto your desktop, then from your desktop into your main public_html folder.  Now we just need to tell EE where it is now, by editing the config.php file so that $conf[‘cp_url’] is correct and there are some path.php settings that will need adjustmet also.  This is something we can walk you through if you get is set up in a sub directory first.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 28 May 2008 04:42 PM   [ Ignore ]   [ # 18 ]  
Summer Student
Total Posts:  13
Joined  04-17-2008

I have attached some printscreens.  I do admire the way you are sticking with me through this!

File Attachments
EE.pdf  (File Size: 105KB - Downloads: 55)
Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64907 Total Logged-in Users: 38
Total Topics: 81849 Total Anonymous Users: 35
Total Replies: 440052 Total Guests: 230
Total Posts: 521901    
Members ( View Memberlist )