Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 redirect users
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 19 May 2006 :  01:41:46  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
Why don't this work?


if MemberID <> "" then
	if Mlev < 2 then
		if instr(Request.ServerVariables("SERVER_NAME"),mytext) then
			Response.Redirect("http://www.someurl.com")
		end if
	end if	
end if


If I leave out the if MemberID <> "" then-part it's working, but then it's blocking ALL visitors, even those not logged in, ie I can't login because I'm redirected =)
I want to have it so that all logged in users with Mlev < moderator get redirected.

/Tribaliztic
- www.gotlandrace.se -

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 19 May 2006 :  06:49:08  Show Profile
Try:
if MemberID>-1 and mlev<3 then
'do something
end if

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 19 May 2006 :  06:58:09  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
Nope, can't login.. As soon as I go to the url I get redirected.
I must be able to be a visitor (not logged in) but as soon as I login and if not moderator/admin then I get redirected.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 19 May 2006 :  06:59:36  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
What I'm trying to do is prevent people from getting to my testing area that's on a subdomain.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 19 May 2006 :  07:07:42  Show Profile  Visit HuwR's Homepage
where are you trying to do this ? if it is outside your forum directory, then make sure you have cookies set to website and not forum
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 19 May 2006 :  07:26:15  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I have the code in inc_header.asp, the forum is in www.site.se and I want to redirect to tryme.site.se. This part actually work, but I get redirected as soon as I enter www.site.se and not (as I want it to work) only redirect after login AND not moderator/admin.
Cookies are set to website.

/Tribaliztic
- www.gotlandrace.se -

Edited by - tribaliztic on 19 May 2006 07:28:33
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 22 May 2006 :  05:25:11  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I changed the code to this:

if strDBNTUserName <> "" then
if Mlev < 3 then
if instr(Request.ServerVariables("SERVER_NAME"),grv2) then
Response.Redirect("http://www.gotlandrace.se/active.asp")
end if
end if
end if

and moved it down a couple of lines, now it's working =)

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07