Page 1 of 1

Portal as Site Main Page

Posted: 7. August 2020 19:37
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.

Re: Portal as Site Main Page

Posted: 19. August 2020 20:01
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

Re: Portal as Site Main Page

Posted: 3. October 2020 12:02
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

Re: Portal as Site Main Page

Posted: 3. October 2020 17:42
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.

Re: Portal as Site Main Page

Posted: 4. October 2020 10:19
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

Re: Portal as Site Main Page

Posted: 6. October 2020 10:22
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

Re: Portal as Site Main Page

Posted: 6. October 2020 11:41
by Harewood
Hi Kirk,

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

Re: Portal as Site Main Page

Posted: 6. October 2020 14:25
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;

Re: Portal as Site Main Page

Posted: 8. October 2020 19:43
by Harewood
Thank you, will give it a go tomorrow... ;)