MyBB Community Forums

Full Version: Problem with redirecting to phpless extensions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm going to preface with, My nginx config (same issue with apache2's htaccess alterative, Tested on both)

location / {
	try_files $uri $uri.html $uri/ @extensionless-php;
}

location @extensionless-php {
    	rewrite ^(.*)$ $1.php last;
}

rewrite ^(/.*)\.php(\?.*)?$ $1$2 permanent;

It works, if you're already logged in, but when it comes to posting, banning, uploading. Generally doing anything. Nothing works. When you go to login, the page will just refresh instead of logging you in. I was wondering if anyone had a possible idea of the problem that I could research into/look into. I just find ".(?)" suffixes disgusting and would prefer not to use any.

This can be closed. I just removed the automatic removal, and removed php references in templates and that works well enough.