.htaccess doesn't work

Problems with the Windows version of XAMPP, questions, comments, and anything related.

.htaccess doesn't work

Postby Cream » 17. February 2007 15:50

Hi

could you help me with .htaccess please:
I put .htaccess into the subfolder htdocs/xxx with this contain
Code: Select all
ErrorDocument 404 /404.html

and try to reach any unexisting document, browser show me this:

Code: Select all
The requested URL xxx/document.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


but it doesn't show document 404.html

I am wondering what is wrong. Thanks for replays.
Cream
 
Posts: 4
Joined: 17. February 2007 15:36

Postby Wiedmann » 17. February 2007 16:05

In which directory have you stored the file "404.html"?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Cream » 17. February 2007 18:41

in the same directory as .htaccess is

this directory is subdirectory (xxx) of htdocs and contains:

- .htaccess
- 404.html
Cream
 
Posts: 4
Joined: 17. February 2007 15:36

Postby Wiedmann » 17. February 2007 18:57

this directory is subdirectory (xxx) of htdocs and contains:

Well, the second parameter in "ErrorDocument" is the absolute URI to the file.

Question:
Which URI must you use in a browser to access this file?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Cream » 17. February 2007 19:55

address in the browser:
Code: Select all
http://localhost/xxx/404.html

and I reach this file.

I suppose that if the .htaccess is in the folder xxx, then the parametr in "ErrorDocument" should be
Code: Select all
ErrorDocument 404 /404.html
Cream
 
Posts: 4
Joined: 17. February 2007 15:36

Postby Wiedmann » 17. February 2007 20:15

address in the browser: http://localhost/xxx/404.html

Ok, the absolute URI path portion is "/xxx/404.html"

And you remember:
Wiedmann wrote:the second parameter in "ErrorDocument" is the absolute URI to the file.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Cream » 17. February 2007 22:44

OK thank you very much
Cream
 
Posts: 4
Joined: 17. February 2007 15:36


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 123 guests