October 13, 2008, 01:20:52 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Check your Page Rank, Backlinks, or Link Popularity in our tools section.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Check your Page Rank, Backlinks, or Link Popularity in our tools section.
Pages: [1]
  Print  
Author Topic:

How to avoid direct access to the forum?

 (Read 1060 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!