November 22, 2008, 09:03:27 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Please support SEO4smf further development donating here or use paypal button from left menu.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Please support SEO4smf further development donating here or use paypal button from left menu.
Pages: [1]
  Print  
Author Topic:

How to avoid direct access to the forum?

 (Read 1254 times)
0 Members and 1 Guest are viewing this topic.
rucanunes
Newbie
*

Points: 0
Offline Offline

Posts: 2


« on: February 22, 2008, 22:24:31 »

Hi,

I've placed this code on index.php of the SMF forum to avoid direct access to the forum:
Code:
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false && strpos($_SERVER['QUERY_STRING'], 'verificationcode') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: http://www.it-info.org/forum/overview.html".$_SERVER['QUERY_STRING']);}}

But than, the Preview Post function stops working.  Sad

Can someone please help me here?

Thank you,
R Nunes
Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!