maleficmax I guess it's about .htaccess redirect, if you visit your website with www (https://www.onthetable.top/forum) icons can't load.
Oops! Something went wrong.... again
- Edited
tolgaaaltas I just totally do not understand what I should do. It has htaccess from distribution. I uncommented some lines because moved public files to forum root and made all the needed changes in index.php and flarum files.
Oh one more. I had to comment the line with MultiViews option in .htaccess because my hosting did not want to work with it. But I previously had flarum beta 7 and everything worked well with this option commented.
Donated to Flarum) Please, help me configure it
You need decide which address you want to use https://yourdomain.top/forum or https://www.yourdomain.top/forum and configure your webserver to redirect permanently to that address. The flarum config needs to be the same as well.
- Edited
I use only https://yourdomain.top/forum everywhere. It does not work if I open forum with either adress. Do you mean, that I have to remove www lines from DNS setup?
- Edited
But!
If I add www, forum shows header box with Forum name, but losts icons.
maleficmax No, just a redirect from www to https://yourdomain.top/forum.
In your .htaccess file, after RewriteEngine on, add something like this:
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://yourdomain.top%{REQUEST_URI} [L,NE,R=301]
There are some more explanation on what it does here: https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/
andreherberth
And it did not work. After adding these lines after RewriteEngine on forum stops loading and browser shows me error about wrong redirection. I checked and rechecked redirect lines, they must be OK. Read the blog entry and everything seems to be fine, but here we are.
- Edited
But redirect works, error is showed when adress line shows adress without www in it
UPD. This should be added in the forum's htaccess or in the root .htaccess of the whole site?
- Edited
@datitisev @clarkwinkelmann guys, is it really .htaccess problem? May it be some using of "www" in the forum code? Because I never use www, but have this problem. I previously used beta 7, it worked good.
After pressing "Log In" I can see 400 Bad Request error in browser log while requesting https://(mysite).top/forum/login URL
If I try to go to https://(mysite).top/forum/login directly, I (of course) get a MethodNotAllowedException, but have an interesting info in details:
REDIRECT_SCRIPT_URI http://(mysite).top/forum/login
SCRIPT_URI http://(mysite).top/forum/login
(HTTP, not HTTPS here!)
Is ot OK?
My htaccess code above was to ensure that visitors would always use the address from your config file.
Right now, visiting your site, I get this debug message:
GET https://yoursite.top/forum/api/posts?filter%5Buser%5D=2&filter%5Btype%5D=comment&page%5Blimit%5D=20&sort=-createdAt
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /forum/api.php was not found on this server.</p>
</body></html>
I managed to register successfully though, so the forum is working.
So, to me this indicate a rewrite error.
I would not be surprised if you have an htaccess file in your root folder that could potentially override something in the forum folder.
Contact me on discord if you want further help
maleficmax I previously used beta 7, it worked good.
Beta 8 changed the layout of the directory structure and rewrite rules. The beta 8 release notes contains all the information about these changes. If you are still trying to use the rewrite rules or layout of beta 7 for a beta 11 Flarum install it will not function properly.
andreherberth
This is very weird. I successfully logged in from another browser. So I deleted all the data from my site in my main browser and... logged in. What the hell was that? I cleaned cache, i reloaded forum many times.
Thank you for your help!
If it suddenly stops working, I will come here to ask you, with your permission
I know that this post is old, but this solution saved me. I could not login, icons were not loading...
Thank you for the tip.
With firefox it does not work for me since today. Brave Browser works fine.
- Edited
Steve33 please start a new support discussion with information about your forum if you need assistance. Start here https://docs.flarum.org/troubleshoot
Information in this thread is very old, but it seems to have been a classic case of inadvertently making a forum accessible through multiple domain names, which isn't supported by Flarum. There are many solutions that depend on the kind of hosting being used.