<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Realising Designs Web Design - Articles &#187; Zeus Webserver</title>
	<atom:link href="http://www.realisingdesigns.com/weblog/category/zeus-webserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.realisingdesigns.com/weblog</link>
	<description>A web design, graphics and photo editing blog</description>
	<lastBuildDate>Tue, 13 Jul 2010 20:02:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Search Engine Friendly URL&#8217;s with CubeCart and Zeus</title>
		<link>http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/</link>
		<comments>http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 09:42:06 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Zeus Webserver]]></category>
		<category><![CDATA[CubeCart]]></category>
		<category><![CDATA[Zeus Web Server]]></category>

		<guid isPermaLink="false">http://www.realisingdesigns.com/weblog/?p=301</guid>
		<description><![CDATA[Update Apr 2009: Thanks to Alistair Brookbanks at CubeCart for looking and updating the rewrite.script &#8211; updated script below.  They are looking to make next major release of CC more Zeus compatible . I think the pain and misery of Zeus is now behind me and I sat and converted the CubeCart .htaccess into a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-308" title="CubeCart Logo" src="http://www.realisingdesigns.com/weblog/wp-content/uploads/2009/03/cubecart.gif" alt="CubeCart Logo" width="280" height="55" /></p>
<p><strong>Update Apr 2009: Thanks to Alistair Brookbanks at CubeCart for looking and updating the rewrite.script &#8211; updated script below.  They are looking to make next major release of CC more Zeus compatible <img src='http://www.realisingdesigns.com/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong>.</p>
<p>I think the pain and misery of Zeus is now behind me and I sat and converted the CubeCart .htaccess into a Zeus rewrite.script in ten minutes.  Previously, it would have involved a minor breakdown and tears.  Anyhow, here it is and I hope you find it useful:</p>
<p><em>NB: this is for an install into a subfolder of /shop/, just edit the &#8216;Root Relative Path&#8217; as required</em></p>
<p><span id="more-301"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p301code2'); return false;">View Code</a> ZEUS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3012"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
</pre></td><td class="code" id="p301code2"><pre class="zeus" style="font-family:monospace;">RULE_0_START:
&nbsp;
## Written by James www.realisingdesigns.com
## Thanks to Alistair @ CubeCart for the updated script
&nbsp;
RULE_0_START:
## set original URL
set SCRATCH:ORIGINAL_URL = %{URL}
## Set Root Relative Path set SCRATCH:ROOT_REL = /shop/
## check for query string and set accordingly
match URL into $ with ^(.*)\?(.*)$
if matched then
 set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:
&nbsp;
RULE_1_START:
## check for Category e.g. /my-category/cat_3.html
match URL into $ with /cat_([0-9]*)\.html
if matched then
    set SCRATCH:INV_ID = $1
    set URL = %{SCRATCH:ROOT_REL}index.php?_a=viewCat&amp;amp;catId=%{SCRATCH:INV_ID}
    goto RULE_2_START
endif
## check for Product e.g. /my-category/my-product/prod_3.html
match URL into $ with /prod_([0-9]*)\.html
if matched then
    set SCRATCH:INV_ID = $1
    set URL = %{SCRATCH:ROOT_REL}index.php?_a=viewProd&amp;amp;productId=%{SCRATCH:INV_ID}
    goto RULE_2_START
endif
## check for Document e.g. /my-page/info_3.html
match URL into $ with /info_([0-9]*)\.html
if matched then
    set SCRATCH:INV_ID = $1
    set URL = %{SCRATCH:ROOT_REL}index.php?_a=viewDoc&amp;amp;docId=%{SCRATCH:INV_ID}
    goto RULE_2_START
endif
## check for tell-a-friend e.g. /tellafriend/tell_3.html
match URL into $ with /tell_([0-9]*)\.html
if matched then
    set SCRATCH:INV_ID = $1
    set URL = %{SCRATCH:ROOT_REL}index.php?_a=tellafriend&amp;amp;productId=%{SCRATCH:INV_ID}
    goto RULE_2_START
endif
## Check for Sale Items Category e.g. /saleitems/cat_saleItems.html
match URL into $ with /saleitems/cat_saleItems.html
if matched then
    set URL = %{SCRATCH:ROOT_REL}index.php?_a=viewCat&amp;amp;catId=saleItems
    goto RULE_2_START
endif
RULE_1_END:
&nbsp;
RULE_2_START:
## Check for Query String and append if required
match SCRATCH:ORIGINAL_URL into % with \?(.*)$
if matched then
 set URL = %{URL}&amp;amp;%{SCRATCH:QUERY_STRING}
endif
goto END
RULE_2_END:</pre></td></tr></table></div>

<p>If you are unfamiliar with Zeus and your site is hosted on it, you need to save the file as &#8220;rewrite.script&#8221; and upload it to your website root.  Any problems, then just leave a comment below.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/" rel="bookmark" class="crp_title">Zeus Webserver WordPress Permalinks Rewrite</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/" rel="bookmark" class="crp_title">Debugging your Zeus redirects</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/" rel="bookmark" class="crp_title">Zeus Webserver 301 Permanent Redirect non-www to www site</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/10/29/using-google-docs-as-a-quick-and-easy-cms/" rel="bookmark" class="crp_title">Using Google Docs as a quick and easy CMS</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/" rel="bookmark" class="crp_title">Getting WordPress MU working on a Zeus Web Server</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging your Zeus redirects</title>
		<link>http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/</link>
		<comments>http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 08:54:53 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Zeus Webserver]]></category>
		<category><![CDATA[User Guide]]></category>
		<category><![CDATA[Zeus Web Server]]></category>

		<guid isPermaLink="false">http://www.realisingdesigns.com/weblog/?p=286</guid>
		<description><![CDATA[Here&#8217;s a little example of code which can help you work out what&#8217;s going wrong with your Zeus webserver redirects.  With the &#8216;SET BODY&#8217; 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 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-288" title="Zeus Web Server Logo" src="http://www.realisingdesigns.com/weblog/wp-content/uploads/2009/03/zws_logo.png" alt="Zeus Web Server Logo" width="123" height="42" /></p>
<p>Here&#8217;s a little example of code which can help you work out what&#8217;s going wrong with your Zeus webserver redirects.  With the &#8216;SET BODY&#8217; command you can place a message in the body content of the page and can output various variable and array content.</p>
<p>The following needs to be in a rewrite.script on your site root:<br />
<span id="more-286"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p286code4'); return false;">View Code</a> ZEUS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2864"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p286code4"><pre class="zeus" style="font-family:monospace;">RULE_0_START:
&nbsp;
map path into SCRATCH:DOCROOT from /
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}
&nbsp;
#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
&nbsp;
RULE_0_END:</pre></td></tr></table></div>

<p>The above will test for a request matching all characters and ending with a query and will output &#8220;QUERY: YOUR QUERY&#8221;.  Once you have the write set-up, you can then add the # symbol to turn it into notation and apply any rules.</p>
<p>Here are some useful Zeus web server links from their website (zeus.com):</p>
<ul>
<li><a title="Read Zeus User Guide" href="http://support.zeus.com/zws/media/docs/4.3/ZWSUserGuide.pdf">User Guide</a> (Pdf)</li>
<li><a title="Read Zeus examples and how to's" href="http://support.zeus.com/zws/examples">Examples and how-to&#8217;s<br />
</a></li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/" rel="bookmark" class="crp_title">Zeus Webserver WordPress Permalinks Rewrite</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/" rel="bookmark" class="crp_title">Search Engine Friendly URL&#8217;s with CubeCart and Zeus</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/" rel="bookmark" class="crp_title">Zeus Webserver 301 Permanent Redirect non-www to www site</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/08/08/quick-sketch-zeus/" rel="bookmark" class="crp_title">Quick sketch: Zeus</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/" rel="bookmark" class="crp_title">Getting WordPress MU working on a Zeus Web Server</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting WordPress MU working on a Zeus Web Server</title>
		<link>http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/</link>
		<comments>http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 08:22:06 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Zeus Webserver]]></category>
		<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[MU]]></category>
		<category><![CDATA[Rewrite.script]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Working]]></category>
		<category><![CDATA[Zeus Web Server]]></category>

		<guid isPermaLink="false">http://www.realisingdesigns.com/weblog/?p=246</guid>
		<description><![CDATA[Anyone on a Zeus web server will know that anything &#8216;Htaccess related&#8217; is going to cause you a headache.  After scouring the WordPress MU (or Multi-user) forums, I found lots of answered threads on exactly that.  With some blood, sweat and tears I now have a working rewrite.script that does take care of most elements [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-248" title="WordPress MU logo" src="http://www.realisingdesigns.com/weblog/wp-content/uploads/2009/03/wp-mu-logo.jpg" alt="WordPress MU logo" width="75" height="75" /></p>
<p>Anyone on a Zeus web server will know that anything &#8216;Htaccess related&#8217; is going to cause you a headache.  After scouring the WordPress MU (or Multi-user) forums, I found lots of answered threads on exactly that.  With some blood, sweat and tears I now have a working rewrite.script that does take care of most elements required.</p>
<p><span id="more-246"></span></p>
<p>My install of WordPress MU opted for the sub-folder option as it more closely resembles the working Rewrite.script for a standard WordPress install.  Whilst the sub-domain route may be possible, this post is only looking a <strong>sub-folder install</strong>.</p>
<p>Below are some of the main points of the rewrite file:</p>
<ul>
<li>Rewrite the location of uploaded files <strong>/files/filename</strong> to <strong>/wp-content/blogs.php?file=filename</strong></li>
<li>Rewrite the &#8220;WP special files&#8221; on sub folder blogs e.g. <strong>/blog1/wp-login.php</strong> to <strong>/wp-login.php</strong></li>
<li>Rewite the &#8220;WP special folders and their files&#8221; on sub folder blogs e.g. <strong>/blog1/wp-content/</strong> to <strong>/wp-content/</strong>, which will fix the style sheets not appearing on the sub folder blogs</li>
<li>Rewrite the Permalink structure for all blog content (master and sub folder blogs) e.g. <strong>/blog/2009/03/15/hello-world/</strong> to <strong>/index.php?q=/blog/2009/03/15/hello-world/</strong></li>
</ul>
<p>There is also a mention of Plugins in the Apache .htaccess, but I am yet to include this in.  Although getting the above to work was tricky and the web void of much help, I do feel that the pieces have fit together in my head (finally!).   I am more than happy to share my draft working rewrite.script, so please leave a comment.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/" rel="bookmark" class="crp_title">Zeus Webserver 301 Permanent Redirect non-www to www site</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/" rel="bookmark" class="crp_title">Zeus Webserver WordPress Permalinks Rewrite</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/" rel="bookmark" class="crp_title">Search Engine Friendly URL&#8217;s with CubeCart and Zeus</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/04/setting-up-free-ftp-with-filezilla/" rel="bookmark" class="crp_title">Setting up free FTP with FileZilla</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/11/26/10-things-to-do-after-installing-the-wonderful-wordpress/" rel="bookmark" class="crp_title">10 Things to do after installing the wonderful WordPress</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Zeus Webserver WordPress Permalinks Rewrite</title>
		<link>http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/</link>
		<comments>http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 14:23:23 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Zeus Webserver]]></category>
		<category><![CDATA[404 error]]></category>
		<category><![CDATA[Permalinks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Zeus Web Server]]></category>

		<guid isPermaLink="false">http://www.realisingdesigns.com/weblog/index.php/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/</guid>
		<description><![CDATA[I have since been looking at the rewrite for WordPress and also to use in my own custom built sites for search engine friendly URL&#8217;s. Again I found very little on the web, but currently have a working model. The rewrite script passes the URL into a variable &#8216;q&#8217;. So to get it out again [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-288" title="Zeus Web Server Logo" src="http://www.realisingdesigns.com/weblog/wp-content/uploads/2009/03/zws_logo.png" alt="Zeus Web Server Logo" width="123" height="42" /></p>
<p>I have since been looking at the rewrite for WordPress and also to use in my own custom built sites for search engine friendly URL&#8217;s. Again I found very little on the web, but currently have a working model.  The rewrite script passes the URL into a variable &#8216;q&#8217;.  So to get it out again I simply passed &#8216;q&#8217; into an array with the following PHP:<span id="more-94"></span></p>
<p>When I have more time, I intend to have a deeper look at WordPress and how they do things.  But for now, here is the rewrite code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p94code6'); return false;">View Code</a> ZEUS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p946"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code" id="p94code6"><pre class="zeus" style="font-family:monospace;">RULE_0_START:
# get the document root
map path into SCRATCH:DOCROOT from /
# initialize our variables
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}
# see if theres any queries in our URL
match URL into $ with ^(.*)\?(.*)$
if matched then
set SCRATCH:REQUEST_URI = $1
set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:
&nbsp;
RULE_1_START:
# prepare to search for file, rewrite if its not found
set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}
# check to see if the file requested is an actual file or
# a directory with possibly an index. don’t rewrite if so
look for file at %{SCRATCH:REQUEST_FILENAME}
if not exists then
look for dir at %{SCRATCH:REQUEST_FILENAME}
if not exists then
set URL = /index.php?q=%{SCRATCH:REQUEST_URI}
goto QSA_RULE_START
endif
endif
# if we made it here then its a file or dir and no rewrite
goto END
RULE_1_END:
&nbsp;
QSA_RULE_START:
# append the query string if there was one originally
# the same as [QSA,L] for apache
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
set URL = %{URL}&amp;amp;%{SCRATCH:QUERY_STRING}
endif
goto END
QSA_RULE_END:</pre></td></tr></table></div>

<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/" rel="bookmark" class="crp_title">Search Engine Friendly URL&#8217;s with CubeCart and Zeus</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/" rel="bookmark" class="crp_title">Debugging your Zeus redirects</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/" rel="bookmark" class="crp_title">Zeus Webserver 301 Permanent Redirect non-www to www site</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/" rel="bookmark" class="crp_title">Getting WordPress MU working on a Zeus Web Server</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/10/29/using-google-docs-as-a-quick-and-easy-cms/" rel="bookmark" class="crp_title">Using Google Docs as a quick and easy CMS</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zeus Webserver 301 Permanent Redirect non-www to www site</title>
		<link>http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/</link>
		<comments>http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 13:02:20 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Zeus Webserver]]></category>

		<guid isPermaLink="false">http://www.realisingdesigns.com/weblog/index.php/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/</guid>
		<description><![CDATA[I have just been on a long and winding journey of web pages with Zeus codes that just didn&#8217;t work for me. At least for now I am at the end and have a working rewrite.script that redirects all non-www pages to their www counterparts. To apply the following: Copy and paste the code shown [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.realisingdesigns.com/weblog/images/zws_logo.png" alt="Zeus Webserver Logo" /></p>
<p>I have just been on a long and winding journey of web pages with Zeus codes that just didn&#8217;t work for me.  At least for now I am at the end and have a working rewrite.script that redirects all non-www pages to their www counterparts.  To apply the following:</p>
<ol>
<li>Copy and paste the code shown below into a file named rewrite.script</li>
<li>Replace <strong>example.co.uk</strong> with your own site</li>
<li>Upload to the root directory of your site</li>
<li>Try out the redirect yourself in a browser</li>
<li>User a HTML Server Response checker to make sure all is ok</li>
</ol>
<p>Below is the code, which should not be changed with the exception of the domain name and be sure to escape the . with a \ in line 2 e.g. example\.com, example\.co\.uk:<br />
<span id="more-85"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.realisingdesigns.com/weblog/wp-content/plugins/wp-codebox/wp-codebox.php?p=85&amp;download=download.txt">download.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p858"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p85code8"><pre class="zeus" style="font-family:monospace;">RULE_0_START:
match IN:Host into $ with ^example\.co\.uk$
if matched then
match URL into $ with ^/(.*)$
    set OUT:Location = http://www.example.co.uk/$1
    set OUT:Content-Type = text/html
    set RESPONSE = 301
    set BODY = Moved
goto END
endif
RULE_0_END:</pre></td></tr></table></div>

<p>If you find this code useful or even find it doesn&#8217;t work for you, then please let me know.  You can now combine this with our free <a href="http://www.realisingdesigns.com/tools/http-server-response.php">HTTP Server Response tool</a> to check your 301 Redirect is working as it should.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.realisingdesigns.com/weblog/2008/10/27/zeus-webserver-wordpress-permalinks-rewrite/" rel="bookmark" class="crp_title">Zeus Webserver WordPress Permalinks Rewrite</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/24/debugging-your-zeus-redirects/" rel="bookmark" class="crp_title">Debugging your Zeus redirects</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/27/search-engine-friendly-urls-cubecart-zeus/" rel="bookmark" class="crp_title">Search Engine Friendly URL&#8217;s with CubeCart and Zeus</a></li><li><a href="http://www.realisingdesigns.com/weblog/2008/07/29/free-http-server-response-code-checker/" rel="bookmark" class="crp_title">Free HTTP Server Response Code Checker</a></li><li><a href="http://www.realisingdesigns.com/weblog/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/" rel="bookmark" class="crp_title">Getting WordPress MU working on a Zeus Web Server</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.realisingdesigns.com/weblog/2008/07/30/zeus-webserver-redirect-non-www-to-www-site/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
