index.php file in subdirectory not loading unless direct url entered

Status
Not open for further replies.

csc2ya

Member
Messages
120
Reaction score
0
Points
16
I've just installed qdbs (a quote database similar to bash.org) on my hosting here, which seems to work fine apart from one thing.

One of the links is to get into the admin section to add/remove users, quotes etc.

However, the default link (http://csc2ya.co.cc/admin) only brings up an error page saying the page cannot be found.

The only way that currently works is to directly enter http://csc2ya.co.cc/admin/index.php as the url.

Does anyone know how to change this so that it will load the index.php file by default in that directory?

That is the only file in the admin directory.
 
Last edited:

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
for some reason apache tells it to look for index.cgi

you might want to edit the .htaccess I believe to get it to see the index.php
but you might want to get an opinion from somebody else, since this is not my field. I just know a little about it.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
That's what it looks like to me as well.

I'm thinking that the index for the main directory was set to index.cgi, and as a result, all sub-directories also had the DirectoryIndex set to index.cgi

just edit/add a .htaccess in /admin/ that says the DirectoryIndex is index.php
 

jtwhite

Community Advocate
Community Support
Messages
1,381
Reaction score
30
Points
0
If you're not sure how to do that, edit/add this to your .htaccess file:

Code:
     DirectoryIndex index.html index.php
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
I've just installed qdbs (a quote database similar to bash.org) on my hosting here, which seems to work fine apart from one thing.

One of the links is to get into the admin section to add/remove users, quotes etc.

However, the default link (http://csc2ya.co.cc/admin) only brings up an error page saying the page cannot be found.

The only way that currently works is to directly enter http://csc2ya.co.cc/admin/index.php as the url.

Does anyone know how to change this so that it will load the index.php file by default in that directory?

That is the only file in the admin directory.

Do you really deserve support with an avatar like that? Also, it is likely an htaccess issue to begin with... Can you post your htaccess files here?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Do you really deserve support with an avatar like that? Also, it is likely an htaccess issue to begin with... Can you post your htaccess files here?

Oh wait, we already helped him. You're too late.

If you don't like the avatar or whatever, don't even bother posting.
 

csc2ya

Member
Messages
120
Reaction score
0
Points
16
Thanks for all the replies. I found the problem.

I had an .htaccess file in the admin directory for the script and in the root directory (public_html)

After removing the file from the root directory, leaving just the one in the admin directory, everything is loading as it should without having to enter direct links.

oh...and zapzack. I understand you may not like my avatar. It is simply meant to be funny. I found it on another forum, and decided to use it for most forums I am a member of.

Until a staff member or admin asks me to remove or change it (if they ask I will remove or change it....hopefully they can see it is meant as humour though), it will remain there.
 
Last edited:
Status
Not open for further replies.
Top