July 05, 2008, 00:29:18 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

How to avoid direct access to the forum?

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