0

Уважаемые господа! Форум стоял на домене /. Я хочу его засунуть в папку /forum/ Как правильно это сделать?

По моему мнению нужно прописать путь в файле .htaccess:

#   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>

ErrorDocument 401 default
ErrorDocument 403 default
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} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

Как правильно это сделать?

2
  • с чего вдруг только .htaccess? в настройках или в БД пути не используются? прочитайте комментарий про rewritebase в этом файле.
    – thunder
    16 ноя 2012 в 9:34
  • Так что надо сделать?
    – Greg888
    16 ноя 2012 в 13:40

1 ответ 1

1

Прочитать вот этот кусок:

#   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
3
  • Так вроде первым делом это сделал: RewriteBase /forum/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) - [NC,L] RewriteRule ^.*$ /forum/index.php [NC,L] </IfModule>
    – Greg888
    16 ноя 2012 в 14:14
  • так где форум-то стоял? в корне, если я правильно понял? а сейчас переехал в /forum/? почему тогда вы тут RewriteBase /forum/xenforo? Хоть немного логики включите... вот это что такое? RewriteRule ^.*$ /forum/index.php [NC,L] погуглили бы сначала
    – thunder
    16 ноя 2012 в 14:19
  • Помогите, как правильно? Я уже и так пробовал и так...
    – Greg888
    16 ноя 2012 в 14:24

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.