Realising Designs Articles


Date icon Posted: March 24th, 2009

Post icon Debugging your Zeus redirects

Google Buzz

Zeus Web Server Logo

Here’s a little example of code which can help you work out what’s going wrong with your Zeus webserver redirects.  With the ‘SET BODY’ command you can place a message in the body content of the page and can output various variable and array content.

The following needs to be in a rewrite.script on your site root:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
RULE_0_START:
 
map path into SCRATCH:DOCROOT from /
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}
 
#Check for Querystring and add to Scratch
match SCRATCH:ORIG_URL into $ with ^/(.*)\?(.*)$
if matched then
	set SCRATCH:QUERY_STRING = $2
	set BODY=QUERY: %{SCRATCH:QUERY_STRING}
endif
 
RULE_0_END:

The above will test for a request matching all characters and ending with a query and will output “QUERY: YOUR QUERY”. Once you have the write set-up, you can then add the # symbol to turn it into notation and apply any rules.

Here are some useful Zeus web server links from their website (zeus.com):

Share This Post

Share this post:

Delicious Icon   Digg Icon   Redditt Icon   Facebook Icon   StumbleUpon Icon

Leave a Reply

CommentLuv Enabled


Copyright © 2005-2010 Realising Designs Limited

Tel: 0800 634 8536 / Itnl +44(0)1227 787027

Home