News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

please look at my forum. Need refresh few times then forum will show

Started by mnn2, August 31, 2016, 01:02:17 AM

Previous topic - Next topic

mnn2

Please help looking at my fresh install forum: hkforum.org

I need refresh few times then the forum will show. What went wrong?


Grammy

Although I don't know what's causing this, I can confirm to anyone else who sees your post that I just tried it on several browsers and I also have to refresh several times to see the forum.  It may have something to do with a redirect (the directory "english") while loading. 

Be patient and don't bump the thread, someone will be by soon who can sort it.   :)

mnn2

Quote from: Grammy on August 31, 2016, 07:22:24 AM
Although I don't know what's causing this, I can confirm to anyone else who sees your post that I just tried it on several browsers and I also have to refresh several times to see the forum.  It may have something to do with a redirect (the directory "english") while loading. 

Be patient and don't bump the thread, someone will be by soon who can sort it.   :)

My domain index page content:

hkforum.org/index.html

<!DOCTYPE html>
<html>
    <head>
<meta charset="UTF-8">
        <meta http-equiv="refresh" content="0; url=http://hkforum.org/english/" />
<script type="text/javascript">
            window.location.href = "http://hkforum.org/english/"
        </script>
        <title>Page Redirection</title>

    </head>
    <body>
If you are not redirected automatically, click <a href='http://hkforum.org/english/'>here</a>.
            </body>
</html>


I think there is nothing unusual for the redirect html index page there, right?

Grammy

I'm not qualified to say.  My redirects are all done from within my server's CP, rather than hard-coded into the index page. But I see that others have logged into SMF who will able to weigh in. 

Then again, the redirect may not even be the issue.   :)

Siirist

Quote from: mnn2 on August 31, 2016, 08:08:53 AM

My domain index page content:

hkforum.org/index.html

<!DOCTYPE html>
<html>
    <head>
<meta charset="UTF-8">
        <meta http-equiv="refresh" content="0; url=http://hkforum.org/english/" />
<script type="text/javascript">
            window.location.href = "http://hkforum.org/english/"

This and all the above are using "

        </script>
        <title>Page Redirection</title>

    </head>
    <body>
If you are not redirected automatically, click <a href='http://hkforum.org/english/'>here</a>.

This link is using '

            </body>
</html>


I think there is nothing something unusual for the redirect html index page there, right?


Just my thoughts,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Matthew K.

It's indeed (probably) taking so long because of the redirect. It's a front end redirect meaning the entire document has to be loaded by your browser prior to it redirecting you.

Try this. Replace your index.html with an index.php that just has this:
<?php
header
('Location: http://hkforum.org/english');

That will redirect you from server-side so the delay will be less - there's no DOM to be loaded by your browser and then have your browser do the lifting to redirect when it's complete.

Although honestly the best way would be with a .htaccess 301 redirect.

mnn2

Quote from: тнє נя. on August 31, 2016, 11:30:08 AM
It's indeed (probably) taking so long because of the redirect. It's a front end redirect meaning the entire document has to be loaded by your browser prior to it redirecting you.

Try this. Replace your index.html with an index.php that just has this:
<?php
header
('Location: http://hkforum.org/english');

That will redirect you from server-side so the delay will be less - there's no DOM to be loaded by your browser and then have your browser do the lifting to redirect when it's complete.

Although honestly the best way would be with a .htaccess 301 redirect.

I already changed the index to php. But the problem still there.

Need to refresh many times then the forum only showing.

Matthew K.

What is the content of your index.php file? Did you put JUST what I said to put in it?

mnn2

Quote from: тнє נя. on August 31, 2016, 12:19:29 PM
What is the content of your index.php file? Did you put JUST what I said to put in it?

Yes, I just put exactly like what you said.

Matthew K.

I'm curious how you've setup your forum. It's either how you have it configured or something with Apache possibly (.htaccess?)

You know that SMF is translated into many different languages, so you could just have your main site with multiple language packs installed instead of having two separate directories?

mnn2

Quote from: тнє נя. on August 31, 2016, 01:34:32 PM
I'm curious how you've setup your forum. It's either how you have it configured or something with Apache possibly (.htaccess?)

You know that SMF is translated into many different languages, so you could just have your main site with multiple language packs installed instead of having two separate directories?

I installed straight from default English version. Only English version.

Matthew K.

I know that, I can tell. But why if you have separate directories for each language? Do you have another copy of your forum running in another directory?

mnn2

Quote from: тнє נя. on August 31, 2016, 03:03:17 PM
I know that, I can tell. But why if you have separate directories for each language? Do you have another copy of your forum running in another directory?

I am on Sentora hosting panel. In my hosting package, I only have one copy of SMF forum running.

I am not sure whether there is other SMF forum running on the same server.

Grammy

Why do you feel you need a redirect to a separate "english" directory?  You should consider installing the forum, as is, without a redirect, and then installing the necessary additional language packs.  Then you could just allow your users to select the language they need.   :)

http://download.simplemachines.org/?smflanguages

mnn2

Quote from: Grammy on September 01, 2016, 07:24:34 AM
Why do you feel you need a redirect to a separate "english" directory?  You should consider installing the forum, as is, without a redirect, and then installing the necessary additional language packs.  Then you could just allow your users to select the language they need.   :)

http://download.simplemachines.org/?smflanguages

It's permitted to install SMF on sub folder. So, it will give me option in the future to use other application from the domain homepage.

But that is not my issue. The problem now is my SMF forum is not working. Need many refreshes before can see anything.

Grammy

Quote from: mnn2 on September 01, 2016, 07:41:03 AM
It's permitted to install SMF on sub folder. So, it will give me option in the future to use other application from the domain homepage.

But that is not my issue. The problem now is my SMF forum is not working. Need many refreshes before can see anything.

Most people DO install SMF into its own subfolder, that's not the issue.  But when they do, the sub-directory is part of the link given out to the public as the way to access the forum. In fact, if I go straight to your forum with this link, your forum loads instantly:

http://hkforum.org/english/

Instead of this link, which needs the redirect:

http://hkforum.org/

Your root domain is hkFORUM.org, which hints that you intend the domain to be used only for a forum.  If you do, then you should have put the forum into the root.  But if you wanted SMF in a separate directory, perhaps you should have either named that directory something else (since English is the default language for SMF) or if not, then give that first link I showed you as the official link when you direct users to your forum.   :)


EDIT:  You appear to have changed something, since going to the direct link (/english) was loading instantly for me before and now behaves as the original link (with the redirect).  But if you insist on having a redirect, that's what's causing the need to refresh. 

mnn2

I hope someone will offer help.

Redirect or not is not causing the problem.

Now I even change back the hkforum.org/index.html to static content.

Same old problem.

Grammy

Quote from: mnn2 on September 01, 2016, 09:07:08 AM
I hope someone will offer help.

Redirect or not is not causing the problem.

Now I even change back the hkforum.org/index.html to static content.

Same old problem.


Do you actually own the domain hkforum.org, or are you simply hosting your forum on it and it has to be in its own directory?

Either way, if you install SMF into its own directory, fresh out of the zip, the way it comes (again, English is the default; there's no need to redirect to it) then it should load just fine, provided your URL goes straight to the directory, instead of redirecting.  So, if for example, you loaded SMF into a directory called "community" the address would be hkforum.org/community.  But, since you don't agree that the redirect is causing the issue, then yes, sit tight, and someone else will read this and sort it for you.

(You should not have a separate index.html in the same directory as your forum.)

Good luck.   :)

Matthew K.

Why would you change it back to a frontend redirect? That definitely increases the redirect time, I guarantee it. My guess is this problem is an issue with either a .htaccess or your forums configuration.

Advertisement: