Portal as Site Main Page

Current Version: 2.1.0
Released: 2015-10-26
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
kiokus
Active Member
Posts: 2
Joined: 7. August 2020 19:24

Portal as Site Main Page

Post by kiokus »

Kevin wrote: add to your .htaccess this:

Code: Select all

DirectoryIndex app.php/portal index.php index.html index.htm
Hi,

This code is correct if the Portal is at the root.

But if the Portal is in a Directory, named par example, "forum"?

Then the code perhaps would be with "forum":

Code: Select all

DirectoryIndex forum/app.php/portal index.php index.html index.htm
But in this case, this will show only the Portal modules text, broken without styles. With an URL like "www.site/app.php/portal", and not "www.site/forum/app.php/portal".

What is wrong?

Thanks in advance.
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Portal as Site Main Page

Post by Kirk »

The portal extension is always in the same directory. The code must be like this:

Code: Select all

DirectoryIndex app.php/portal index.php index.html index.htm
Gruß Udo
User avatar

Harewood
Active Member
Posts: 13
Joined: 20. January 2020 09:38
phpBB.de User: Jae
phpBB.com User: Jae

Re: Portal as Site Main Page

Post by Harewood »

Hi,
Just to confirm, if I want the Portal page to be the main homepage I do the following:
  • ftp to forum root dir [where app.php resides]
  • download .htaccess file
  • open .htaccess with TextPad and add at the following text to the bottom of the file

Code: Select all

# The following code makes the portal page the default homepage.
DirectoryIndex app.php/portal index.php index.html index.htm
  • save .htaccess file and ftp upload updated .htaccess file to forum root dir.
Jason

Topic author
kiokus
Active Member
Posts: 2
Joined: 7. August 2020 19:24

Re: Portal as Site Main Page

Post by kiokus »

Kirk wrote: 19. August 2020 20:01 The portal extension is always in the same directory. The code must be like this:

Code: Select all

DirectoryIndex app.php/portal index.php index.html index.htm
As we have already mentioned, this code is correct only if the Portal and the Forum are at the root.

But it doesn't work if they are in a Directory.

The question is what is the correct code if they (Forum and Portal) are in a directory, and not in the root?

Thanks in advance.
User avatar

Harewood
Active Member
Posts: 13
Joined: 20. January 2020 09:38
phpBB.de User: Jae
phpBB.com User: Jae

Re: Portal as Site Main Page

Post by Harewood »

Just tried the following code in .htaccess and it didnt work...

Code: Select all

# The following code makes the portal page the default homepage.
DirectoryIndex app.php/portal index.php index.html index.htm
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Portal as Site Main Page

Post by Kirk »

There is an alternative, create a file called portal.php with the following content:

Code: Select all

<?php
header("Location: https://xxxx/app.php/portal/");
exit;
Replace the xxx with the URL to your forum. Load this file into your forum root (where the config.php is located).
Open: root/.htaccess
Insert this at the very end:

Code: Select all

DirectoryIndex portal.php index.php index.html index.htm
Gruß Udo
User avatar

Harewood
Active Member
Posts: 13
Joined: 20. January 2020 09:38
phpBB.de User: Jae
phpBB.com User: Jae

Re: Portal as Site Main Page

Post by Harewood »

Hi Kirk,

Thank you for the reply and I did as requested but got the error Page not found?
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Portal as Site Main Page

Post by Kirk »

Does it work like that?

Code: Select all

<?php
header("Location: https://xxxx/app.php/portal");
exit;
Or:

Code: Select all

<?php
header("Location: https://xxxx/portal");
exit;
Gruß Udo
User avatar

Harewood
Active Member
Posts: 13
Joined: 20. January 2020 09:38
phpBB.de User: Jae
phpBB.com User: Jae

Re: Portal as Site Main Page

Post by Harewood »

Thank you, will give it a go tomorrow... ;)
Locked

Return to “Board3 Portal 2.1.x - English Support”