1. Приветствуем Вас на неофициальном форуме технической поддержки XenForo на русском языке. XenForo - коммерческий форумный движок от бывших создателей vBulletin, написанный на PHP.

1.2.4 Не срабатывает правило в .htaccess

Тема в разделе "Основные вопросы по XenForo", создана пользователем Дмитрий Артёменко, 26.12.2013.

Загрузка
  1. Дмитрий Артёменко

    Дмитрий Артёменко Местный

    Регистрация:
    26.09.11
    Сообщения:
    195
    Симпатии:
    3
    Версия XF:
    1.3.1
    Здравствуйте. Стоит форум XF, и все время в логах апача (error.log)
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:
    [Thu Dec 26 14:48:32 2013] [error] [client 95.111.130.141] File does not exist:

    На кучу различных файлов папок и так далее, собственно заглянул в .htaccess а там :


    <IfModule mod_rewrite.c>
    RewriteEngine On

    # If you are having problems with the rewrite rules, remove the "#" from the
    # line that begins "RewriteBase" below. You will also have to change the path
    # of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    # This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    Почему оно не срабатывает? И в логи пишет все время?

    Полный .htaccess


    PHP:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>

    <Files admin.php>
      
    Order deny,allow
      Deny from all
      Allow from myIp
    </Files>


    ErrorDocument 401 default
    ErrorDocument 403 http://mysite.com/
    ErrorDocument 404 default
    ErrorDocument 500 default
    <
    IfModule mod_rewrite.c>
        
    RewriteEngine On

        
    #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo

        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

        
    RewriteCond %{REQUEST_FILENAME} -[OR]
        
    RewriteCond %{REQUEST_FILENAME} -[OR]
        
    RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule 
    ^.*$ - [NC,L]
        
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        
    RewriteRule ^.*$ index.php [NC,L]
    </
    IfModule>
     

Поделиться этой страницей