MyBB Community Forums

Full Version: 404 after login, double address index.php/index.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey
i have a problem. After login to my website, i'am redirected to address with double "index.php" for example: https://example.com/index.php/index.php and i get error 404. If i erase "/indes.php" form the end, i am on the website and everything works perfectly. My problem occurs only after login!
When i click on members from menu, and then i login, the address looks: https://example.com/memberlist.php/memberlist.php.
In configuration settings i have only https://example.com - without / and /index.php on the end
I use nginx, php5.6

sorry for my bad english, please use simple words, thanks!

I found the solution.
The problem was in correct nginx serwer redirect configuration. This site helps me:
https://www.rosehosting.com/blog/how-to-...p-fpm-vps/
The config file should looks like:

server {
    listen       80;
    server_name your-domain.com;
    access_log logs/your-domain.com_access.log;
    error_log logs/your-domain.com_error.log;
    root /var/www/html/mybb;
    location / {
    server_tokens off;
    index index.html index.htm index.php;
    rewrite ^/forum-([0-9]+)\.html$ /forumdisplay.php?fid=$1;
    rewrite ^/forum-([0-9]+)-page-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2;
    rewrite ^/thread-([0-9]+)\.html$ /showthread.php?tid=$1;
    rewrite ^/thread-([0-9]+)-page-([0-9]+)\.html$ /showthread.php?tid=$1&page=$2;
    rewrite ^/thread-([0-9]+)-lastpost\.html$ /showthread.php?tid=$1&action=lastpost;
    rewrite ^/thread-([0-9]+)-nextnewest\.html$ /showthread.php?tid=$1&action=nextnewest;
    rewrite ^/thread-([0-9]+)-nextoldest\.html$ /showthread.php?tid=$1&action=nextoldest;
    rewrite ^/thread-([0-9]+)-newpost\.html$ /showthread.php?tid=$1&action=newpost;
    rewrite ^/thread-([0-9]+)-post-([0-9]+)\.html$ /showthread.php?tid=$1&pid=$2;
    rewrite ^/post-([0-9]+)\.html$ /showthread.php?pid=$1;
    rewrite ^/announcement-([0-9]+)\.html$ /announcements.php?aid=$1;
    rewrite ^/user-([0-9]+)\.html$ /member.php?action=profile&uid=$1;
    rewrite ^/calendar-([0-9]+)\.html$ /calendar.php?calendar=$1;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)\.html$ /calendar.php?action=yearview&calendar=$1&year=$2;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ /calendar.php?calendar=$1&year=$2&month=$3;
    rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ /calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4;
    rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ /calendar.php?action=weekview&calendar=$1&week=$2;
    rewrite ^/event-([0-9]+)\.html$ /calendar.php?action=event&eid=$1;
        }
    location ~ /(inc|uploads/avatars) {
        deny all;
        }
    location ~* \.(jpg|jpeg|gif|png|css|ico|xml)$ {
    access_log        off;
    log_not_found     off;
    expires           360d;
        }
    location ~ \.php$ {
        try_files $uri =404;
        include /etc/nginx/conf/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /var/www/html/mybb/$fastcgi_script_name;
        }
    location ~ /\.ht {
        deny all;
        }
}