Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Changing the DirectoryIndex
Index -> Programming, PHP -> PHP Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Amailer




PostPosted: Sat Aug 30, 2003 11:26 am   Post subject: Changing the DirectoryIndex

Ok, to change a Directory Index i gatta put:
code:

DirectoryIndex MYFILENAME.php


Right?
Err its not workign though :S
can anyone help me?
Sponsor
Sponsor
Sponsor
sponsor
octopi




PostPosted: Sat Aug 30, 2003 11:40 am   Post subject: (No subject)

Yup, that looks right.

Are you putting it in a .htaccess file. or the main config file?
Try putting it in your default virtual server block. (if you tryed the main file before)

If your trying the .htaccess file way check to see if your server uses .htaccess, you can change it to different file name, that might have happened.

Error log say anything?

Whats happening? You just said its not working, thats not enough...
Does the directory listing come up? Or does it load another page?
Does it display an Internal Server Error?
Blade




PostPosted: Sat Aug 30, 2003 11:46 am   Post subject: (No subject)

... are you using the VirtualDocumentRoot that was posted in the other topic? because if you are you'll have to change that instead
Amailer




PostPosted: Sat Aug 30, 2003 12:09 pm   Post subject: (No subject)

Log error: [Sat Aug 30 12:20:51 2003] [warn] (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.

And, yes im putting it in my .htaccess file
I want to change index file to portal.php index of index.php. Only for that folder.
Amailer




PostPosted: Sat Aug 30, 2003 12:26 pm   Post subject: (No subject)

code:

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All


HEhe,
K i got it. It was None. So now everythign works. EVER MY CUSTOM ERRORS!
(atleast i think my custom errors work :S)

EDIT: For the custom error...HOW ODD it comes as: the path i put to the error file.

I.E: http://forum.termix-zero.ath.cx/sadasd

What i put in my .htaccess in my htdocs:
code:

ErrorDocument 403 ./error/403.php
ErrorDocument 404 ./error/404.php
ErrorDocument 401 ./error/401.php


And what is written in the 404.php:
code:

404 ERROR TEST
Homer_simpson




PostPosted: Sat Aug 30, 2003 12:54 pm   Post subject: (No subject)

what exactly do u mean create a .htaccess file u mean open a newtext file and save it as .htaccess ?
Amailer




PostPosted: Sat Aug 30, 2003 1:10 pm   Post subject: (No subject)

No, not possiable.
Get it from somewhere :S
octopi




PostPosted: Sat Aug 30, 2003 2:36 pm   Post subject: (No subject)

It is posible. you just say it as

".htaccess"

should work on most programs (include the qoutes.)

Or just change the name of the Options file in your httpd.conf.
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Sat Aug 30, 2003 6:03 pm   Post subject: (No subject)

well anyways... i still can't get it to work
octopi




PostPosted: Sat Aug 30, 2003 6:09 pm   Post subject: (No subject)

I thought you said it did work?


Amailer wrote:
HEhe,
K i got it. It was None. So now everythign works.



If you mean the .htaccess thing, try it in notepad, it should work fine.

".htaccess" with the qoutes.
Amailer




PostPosted: Sat Aug 30, 2003 7:32 pm   Post subject: (No subject)

Amailer wrote:
code:

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All


HEhe,
K i got it. It was None. So now everythign works. EVER MY CUSTOM ERRORS!
(atleast i think my custom errors work :S)

EDIT: For the custom error...HOW ODD it comes as: the path i put to the error file.

I.E: http://forum.termix-zero.ath.cx/sadasd

What i put in my .htaccess in my htdocs:
code:

ErrorDocument 403 ./error/403.php
ErrorDocument 404 ./error/404.php
ErrorDocument 401 ./error/401.php


And what is written in the 404.php:
code:

404 ERROR TEST


Thats what happned.
octopi




PostPosted: Sat Aug 30, 2003 7:41 pm   Post subject: (No subject)

apache is interpretting your path as a message, and not a path.
(ErrorDocument CODE path/message is the syntax)

You should remove the . from the begining of the path.

The path is from document root.
Amailer




PostPosted: Sat Aug 30, 2003 9:04 pm   Post subject: (No subject)

tried that it gives me this message:
code:

Not Found

The requested URL /index.phps was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.45 (Win32) Server at forum.termix-zero.ath.cx Port 80

octopi




PostPosted: Sat Aug 30, 2003 9:06 pm   Post subject: (No subject)

error log entries?

(give me about the last 10)


...it says it can't find the file.
What path did you use for the 404 file, and where is it really.
Whats the FULL path to the 404 error file.
Whats the FULL path for document root.
octopi




PostPosted: Sat Aug 30, 2003 9:07 pm   Post subject: (No subject)

Based on what you have said previously.
You need to make a file and put it here:
http://forum.termix-zero.ath.cx/error/404.php
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 22 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: