MyBB Community Forums

Full Version: Portal not redirecting to the index page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

Since a long time,i had made a modifications to my portal template with the following:





<html>
<head>
<title>Goodbye!</title>
<SCRIPT language="JavaScript">
<!--
window.location="{$mybb->settings['bburl']}/index.php";
//-->
</SCRIPT>
</head>
<body>
No Portal, goodbye ...
</body>
</html>


This had been done to redirect users to the index page if they visit the portal page.

After the update,it hasn't been working anymore and i'm getting the following error:

[attachment=40583]

Can you please help me?

Thankyou
This works fine for me. When does this error occur? When going to Portal.php? Does it redirect and then display the error?
Hello!

The error occurs,when i visit my forum's url just by adding /portal to the url.I have deactivated portal in ACP.

Thanks
Please help!
Nobody!
Try replacing:

window.location="{$mybb->settings['bburl']}/index.php";

With the full path of your forum. For example, http://www.mydomain.com/index.php
(2018-07-09, 01:22 PM)kbilly Wrote: [ -> ]The error occurs,when i visit my forum's url just by adding /portal to the url.I have deactivated portal in ACP.

So you are unable to access portal after you deactivated it?

I don't understand the issue.
If i activate the portal from ACP and i click on "Portal" it will redirect me to my forum url for example:


https://community.mybb.com/

But if i add manually /portal to the end of my forum url,for example:


https://community.mybb.com/portal


It will issue 404 not found. This error is issued even if i have portal enabled or disabled from ACP.

It used to be work fine days ago.

Thankyou.


Edit:I think i need to add /portal.php to the url's end to generate that script ,right?I added just /portal
Ah I see the issue. So it is redirecting just not to the right page. You need to add .php to the end.
https://community.mybb.com/portal
and
https://community.mybb.com/portal.php

Are two different addresses.