Javascript-форум (https://javascript.ru/forum/)
-   Серверные языки и технологии (https://javascript.ru/forum/server/)
-   -   Не работает файл htacces (https://javascript.ru/forum/server/27511-ne-rabotaet-fajjl-htacces.html)

devote 16.04.2012 23:26

выложите рабочий файл а не bak

kilogram 16.04.2012 23:56

Подкоректировал теперь в файле httpd.conf оригинале, а не баке все по правилам, выдает ошибку при запуске test.ru

Код:

Forbidden

You don't have permission to access / on this server.

Apache/2.2.19 (Win32) PHP/5.3.6 Server at test.ru Port 80

Вод файл http://tempfile.ru/file/2390170

devote 17.04.2012 01:28

на вот держи: http://spb-piksel.ru/httpd.conf
как скачаешь, скажи, что бы я его удалил со своего хоста.

kilogram 17.04.2012 01:47

Скопировал текст по этой ссылке вставил в свой файл.
Если написать в файле index.php
Код:

<?='Привет малыш!';?>
Все выводится, но если удалить index.php выведется все равно на экран:


У меня в каталоге 2 файла:
100.php
Код:

<html><body>
<?php
echo 'Ошибка!';
?>
</body></html>

и .htaccess
Код:

DirectoryIndex 100.php

devote 17.04.2012 07:33

ищите проблему в этом файле C:/www/conf/extra/httpd-vhosts.conf

kilogram 17.04.2012 19:13

Да вроде там все нормально:
Цитата:

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#




<VirtualHost *:80>
DocumentRoot "C:/www/htdocs/localhost/www"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/www/htdocs/test1.ru/www"
ServerName test1.ru
ServerAlias www.test1.ru
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "C:/www/htdocs/test.ru/www"
ServerName test.ru
ServerAlias www.test.ru
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/www/htdocs/test2.ru/www"
ServerName test2.ru
ServerAlias www.test2.ru
</VirtualHost>

kilogram 17.04.2012 20:57

Я понял в чем прикол, оказівается все на местах, проблема в том что в самом .htaccess нужно было ввести не просто DirectoryIndex 100.php
,а нужно было так DirectoryIndex index.php 100.php
Всем спасибо за помощь и за подсказки


Часовой пояс GMT +3, время: 02:21.