Page 1 of 1

problems with .htaccess

PostPosted: 21. August 2007 00:13
by jurisz
Why htacces do not work? When I add htaccess file to directory I hav 500 internal server error!
My .htaccess:
Code: Select all
DirectoryIndexserv.php
Files "*.*">
 Order allow,deny
 allow from all
</Files>
<Files "*.inc">
 Order allow,deny
 Deny from all
</Files>
<Files "*.dat">
 Order allow,deny
 Deny from all
</Files>
DirectoryIndex index.php index.wml
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.sun.j2me.app-descriptor .jad
AddType application/java-archive .jar
AddType application/x-httpd-php .rss
AddType application/vnd.siemens-mp.theme .sdt
AddType application/vnd.siemens-mp.skin .scs
AddType application/vnd.siemens-mp.t9db .ldb
AddType application/vnd.symbian.install .sis
AddType application/vnd.symbian.install .app
AddType application/x-zip .zip
AddType audio/imelody .imy
AddType audio/midi .srt
AddType audio/midi .mid
AddType audio/mp3 .mp3
AddType audio/aac .aac
AddType image/bmp .bmx
AddType image/png .png
AddType audio/midi .col
AddType text/vnd.sun.j2me.app-descriptor .db
AddType audio/amr .amr
AddType video/3gpp .3gp
AddType video/3gpp .mp4
AddType video/mp4 .mpeg
AddType application/vnd.smaf .mmf
php_flag session.use_trans_sid Off
php_flag safe_mode_gid On
php_value default_mimetype none


this do not work, too:
Code: Select all
DirecotyIndex serv.php


And why when I using WAP (wml version) and I want signup in chat, I have error: empty nickname, empty password, but I entered password and nickname! I must turn register globals ON?[/code]

PostPosted: 21. August 2007 00:25
by Izzy
When ever you get a server 500 error check the xampp\apache\logs\error.log file for details about this error.

Also
Files "*.*">
Is this correct?

=================================================
Take a look at the new DeskTopXampp launch control posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967

The DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
is available here:
http://zedfiles.com/DTX/

I highly recommend DTX.
=================================================

PostPosted: 21. August 2007 00:36
by jurisz
but why DirectoryIndex serv.php do not work? I copied script from topserver.ru server (Russian project similar to xampp) and this script work perfect on topserver but on xampp it has problems. Can I replace xampp php.ini with topserver php.ini?

PostPosted: 21. August 2007 01:29
by Wiedmann
My .htaccess:
Code: Select all
DirectoryIndexserv.php

This line is wrong. (syntax error)

this do not work, too:
Code: Select all
DirecotyIndex serv.php

This line is also wrong. (an other syntax error)

but why DirectoryIndex serv.php do not work?

Without reading/knowing your error.log, nobody can give an answer why you have an error 500...

htaccess

PostPosted: 21. August 2007 08:34
by jurisz
I know it is with errors but my real .htaccess was: DirectoryIndex serv.php :)
error in error_log:
[Tue Aug 21 10:29:37 2007] [alert] [client 69.28.226.98] E:/xampp/htdocs/torrentz.lv/chat/.htaccess: DirectoryIndex not allowed here, referer: http://torrentz.lv/


Maybe it is because my virtuals hosts file has problems?

My virtual hosts file:
Code: Select all
NameVirtualHost 83.99.193.228:80

<VirtualHost 83.99.193.228:80>
DocumentRoot E:/xampp/htdocs/
ServerName localhost
ServerAdmin admin@localhost
</VirtualHost>

<VirtualHost 83.99.193.228:80>
DocumentRoot E:/xampp/htdocs/torrentz.lv/
ServerName torrentz.lv
ServerAdmin admin@torrentz.lv
<Directory "E:/xampp/htdocs/torrentz.lv/">
Options Indexes FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

PostPosted: 21. August 2007 13:30
by Wiedmann
Code: Select all
DirectoryIndex serv.php

E:/xampp/htdocs/torrentz.lv/chat/.htaccess: DirectoryIndex not allowed here

Code: Select all
<Directory "E:/xampp/htdocs/torrentz.lv/">
AllowOverride FileInfo

For DirectoryIndex you must also allow "Indexes" override:
--> http://httpd.apache.org/docs/2.2/mod/mo ... ctoryindex

htaccess

PostPosted: 21. August 2007 14:27
by jurisz
I do not understand how I can change it. I must edit php.ini file? I hope someone help me :)

PostPosted: 21. August 2007 19:26
by jurisz
I am sorry, I am too stupid :p
This error was in vhosts configuratioans file :)