Не работают редиректы IPB

finargot

Проверенные
Сообщения
45
Реакции
0
Баллы
8,103
Приветствую всех.
Столкнулся с проблемой:

Поставил скрипты для перенаправления со старых адресов IPB на новые адреса взяв этот скрипт


В итоге, получаю ошибку ERR_TOO_MANY_REDIRECTS в браузере при переходе на любую страницу. Что делать?
 
Привет. Вот это добавили в .htaccess:
Код:
# IPS Rewrite Rules
    RewriteCond %{REQUEST_URI} /(topic|forum|user)/ [OR]
    RewriteCond %{QUERY_STRING} (^|&)show(topic|forum|user)= [OR]
    RewriteCond %{QUERY_STRING} ^/(topic|forum|user)/ [OR]
    RewriteCond %{PATH_INFO} ^/(topic|forum|user)/
    RewriteRule ^.*$ ips2xf.php [NC,L]
?
 
Код:
# limit_conn_zone $binary_remote_addr zone=addr:10m;

server {
    listen   80;
    server_name dota2vo.ru;

    location / {
        proxy_pass      http://127.0.0.1:8080/;
        proxy_redirect    off;
        proxy_set_header  Host $host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 100m;
        proxy_connect_timeout 10;
       
        error_log /home/dota2vo/sites/dota2vo.ru/logs/nginx-error.log;
        # limit_conn addr 10;
    }
   
    rewrite_log  on;
    location /public {
        rewrite ^(.+)\.(\d+)\.(js|css|png|jpg|gif|less)$ $1.$3 break;

        # limit_conn addr 10;       

        gzip_static on;
        gzip on;
        gzip_min_length 1024;
        gzip_buffers 64 8k;
        gzip_comp_level 5;
        gzip_types text/plain application/xml application/x-javascript text/css;
        gzip_disable     "msie6";

        expires 1y;

        root /home/dota2vo/sites/dota2vo.ru/www/;
    }

    location /forum {
    try_files $uri $uri/ /forum/index.php?$uri&$args;
    index index.php index.html;
}

location /forum/internal_data {
    internal;
}
location /forum/library {
       internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}
}
 
А почему Вы думаете, что у Вас не апач? :) .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

    # IPS Rewrite Rules
    RewriteCond %{REQUEST_URI} /(topic|forum|user)/ [OR]
    RewriteCond %{QUERY_STRING} (^|&)show(topic|forum|user)= [OR]
    RewriteCond %{QUERY_STRING} ^/(topic|forum|user)/ [OR]
    RewriteCond %{PATH_INFO} ^/(topic|forum|user)/
    RewriteRule ^.*$ ips2xf.php [NC,L]

    #    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>
 
Вот на этой строке путь прописан правильный:
Код:
$fileDir = '/home/username/www/forums';
?

И комментирование убрано с этой строки?
Да. Но по сути адрес форума остался тот же, поэтому не нужно менять это поле
 
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу