viewforum.php redirect

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
mocap69
Registered User
Posts: 25
Joined: Sat Aug 14, 2004 3:49 am
Location: LA, CA, USA
Contact:

viewforum.php redirect

Post by mocap69 » Tue Aug 14, 2007 8:38 pm

I looked on my popular page views from my ISP and there seems to be alot of views of this page:
http://www.thefanseye.com/forum/viewforum.php
The problem is they are getting the error: The forum you selected does not exist.
I believe they are getting this error because they are accessing this page outside of the forum directly
somehow. I would like to redirect them back to this page: http://www.thefanseye.com/forum/index.php
Any idea how to accomplish this task?

I found a possible solution but not sure if the solution is worse than the problem:
I changed this line in the viewforum.php:

Code: Select all

message_die(GENERAL_MESSAGE, 'Forum_not_exist');
to this:

Code: Select all

redirect(append_sid("index.$phpEx", true));
Will this work or cause bigger issues?
Talk to REAL NFL players on the LARGEST forum on the WEB!!
http://www.thefanseye.com

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29248
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: viewforum.php redirect

Post by Marshalrusty » Tue Aug 14, 2007 9:07 pm

When the viewforum page is accessed, it expects a forum id to be passed along via GET (viewforum.php?f=1). No links in phpBB go to viewforum.php without passing a forum id. Your host's control panel probably just removes the id from the end of the URI.

Your change to the code is fine, assuming that's the way you want it to behave.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Locked

Return to “2.0.x Support Forum”