Htaccess problem

I have in my root directoty a .htaccess file like this:

[quote]DirectoryIndex . ./xxx/index.php
<Files .htaccess>
order allow,deny
deny from all
It works flawlesly but when I type http://domain/xxx in the browser I have this error

[quote]Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@dominio and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.[/quote]
But if I type http://domain/xxx/indexp.php it works

What I’m doing wrong?

Well, firstly, an extra space seems to have crept into the path for the document you specified for DirectoryIndex in your .htaccess file. Also, the Apache docs for the DirectoryIndex directive state that the document specified does not need to be ‘relative to the directory’, so try this instead;

[color=#0000CC]DirectoryIndex /xxx/index.php
<Files .htaccess>
order allow,deny
deny from all

I just tried this on a test domain of mine and it seemed to work as expected.

Can I ask what you are trying to achieve with the .htaccess file?


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)