Redirect to Board3 Portal from root URL

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
MacBookPro
Registered User
Posts: 46
Joined: Thu Nov 13, 2014 11:22 pm
Name: Stu

Redirect to Board3 Portal from root URL

Post by MacBookPro » Sun Nov 16, 2014 8:41 pm

Currently my forum is at the URL http://www.vw-californiaclub.com which lands at the phpBB home page.

I'd like http://www.vw-californiaclub.com to point at the portal page currently at http://www.vw-californiaclub.com/portal

Can someone please advise what I need to do and what I need to edit to make this happen? Ie get rid of the need to have \portal in the URL.

So far I have all of the Board3 Portal files all in /public_html/ext/board3/portal and the portal does appear to work OK but just not as the main or first page of my website.

I should add I am using phpBB 3.1.1 and Board3 Portal 2.1.0-b1 - English

Thanks.
Regards

Stu..

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Redirect to Board3 Portal from root URL

Post by Oyabun1 » Sun Nov 16, 2014 9:16 pm

Ask in the dedicated support topic for the portal extension or the board you got it from.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

kessa
Registered User
Posts: 9
Joined: Sat Nov 15, 2014 10:16 pm
Location: Greece

Re: Redirect to Board3 Portal from root URL

Post by kessa » Sun Nov 16, 2014 9:38 pm

You can add in the "index.php" file (in the phpbb folder):

Code: Select all

header('Location: http://www.vw-californiaclub.com/portal');

MacBookPro
Registered User
Posts: 46
Joined: Thu Nov 13, 2014 11:22 pm
Name: Stu

Re: Redirect to Board3 Portal from root URL

Post by MacBookPro » Sun Nov 16, 2014 9:44 pm

Thanks for the replies but I am a complete novice to this so I don't fully understand.

I found this instruction -

Open: root/.htaccess

Add this to the end of the file:

Code: Select all

DirectoryIndex app.php index.php index.html index.htm
I have root/.htaccess open for editing and it has quite a bit of text so I don't know exactly where to insert this line.
Regards

Stu..

kessa
Registered User
Posts: 9
Joined: Sat Nov 15, 2014 10:16 pm
Location: Greece

Re: Redirect to Board3 Portal from root URL

Post by kessa » Sun Nov 16, 2014 9:57 pm

That's also a good solution.
I would tell you do add it at the first line in .htaccess, try it and tell us... :)
Plus you can add this:

Code: Select all

Redirect /index.php http://www.vw-californiaclub.com/portal
instead of

Code: Select all

DirectoryIndex app.php index.php index.html index.htm

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Redirect to Board3 Portal from root URL

Post by Oyabun1 » Sun Nov 16, 2014 10:10 pm

kessa wrote:Plus you can add this:

Code: Select all

Redirect /index.php http://www.vw-californiaclub.com/portal
instead of

Code: Select all

DirectoryIndex app.php index.php index.html index.htm
Wouldn't that redirect all requests to the board index page to the portal? Sounds like a really bad idea.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

MacBookPro
Registered User
Posts: 46
Joined: Thu Nov 13, 2014 11:22 pm
Name: Stu

Re: Redirect to Board3 Portal from root URL

Post by MacBookPro » Sun Nov 16, 2014 10:12 pm

Thanks.

So I added the first line

Code: Select all

Redirect /index.php http://www.vw-californiaclub.com/portal
Which works in so much as following the URL http://www.vw-californiaclub.com/ now opens the Portal but also results in the URL http://www.vw-californiaclub.com/app.php/portal showing in the address bar when I would really prefer http://www.vw-californiaclub.com/

So I deleted that and added this line instead

Code: Select all

DirectoryIndex app.php index.php index.html index.htm
Which appears to have done the trick. I was just cautious on where to insert that line in the file however it appears that the very first line in the file is perfectly acceptable.

So thanks again. :D
Regards

Stu..

kessa
Registered User
Posts: 9
Joined: Sat Nov 15, 2014 10:16 pm
Location: Greece

Re: Redirect to Board3 Portal from root URL

Post by kessa » Sun Nov 16, 2014 10:14 pm

@Oyabun1 Actually the code that I wrote sends the user from the index.php page (only) to http://www.vw-californiaclub.com/portal..
@MacBookPro, the good news is that you solved your problem. After 2 minutes I understood what you did there! So it's really a good trick ;)

Locked

Return to “[3.1.x] Support Forum”