<?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>A Leased Line to the Collective Unconscious &#187; zeus</title> <atom:link href="http://www.chichira.com/tag/zeus/feed/" rel="self" type="application/rss+xml" /><link>http://www.chichira.com</link> <description>random scribblings from the other end of the wire</description> <lastBuildDate>Thu, 03 Nov 2011 11:09:38 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>NamesCo Zeus server, 301 Redirects</title><link>http://www.chichira.com/2009/03/30/namesco-zeus-server-301-redirects/</link> <comments>http://www.chichira.com/2009/03/30/namesco-zeus-server-301-redirects/#comments</comments> <pubDate>Mon, 30 Mar 2009 23:29:13 +0000</pubDate> <dc:creator>RobinLayfield</dc:creator> <category><![CDATA[geek stuff]]></category> <category><![CDATA[Karyx]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[namesco]]></category> <category><![CDATA[redirects]]></category> <category><![CDATA[zeus]]></category> <guid
isPermaLink="false">http://www.chichira.com/?p=127</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<p>Howto manage a 301 redirect on a <strong>NamesCo</strong> linux (<strong>Zeus</strong>) server</p><p>I felt I should write this up because it&#8217;s a problem that&#8217;s been puzzling me for some time and I only found out the answer today. Here&#8217;s the deal:</p><p>* it&#8217;s currently recommended that all traffic to a web site goes to one URL, to minimise dilution of the Google PageRank.</p><p>* on <strong>NamesCo </strong>servers, traffic is automatically routed to both http://www.example.com/ and http://example.com</p><p>* ordinarily I would use an <strong>Apache .htaccess</strong> script with a simple <strong>301 redirect</strong> in it, like so:</p><p>RewriteEngine On<br
/> RewriteCond %{HTTP_HOST} ^example\.com<br
/> RewriteRule (.*) http://www.example.com/$1 [R=301,L]</p><p>* But&#8230;. <strong>NamesCo</strong> servers don&#8217;t run on <strong>Apache</strong>, they run on <strong>Zeus</strong></p><p>So what we need is a script that will force <strong>Zeus</strong> to do the same kind of redirect.</p><p>There&#8217;s just one other gotcha, that is specific to NamesCo. The script is only allowed to be run from one place, in the root of your web directory, a file called rewrite.script. You can edit this manually but by far the best way to manipulate it is via the control panel on the NamesCo server. There&#8217;s a module under<em><strong> Scripts &amp; eCommerce</strong></em> called <strong><em>Rewrite Script</em></strong>.</p><div
id="attachment_128" class="wp-caption alignnone" style="width: 182px"><img
class="size-full wp-image-128" title="Screen grab of NamesCo control panel" src="http://www.chichira.com/wp-content/uploads//capture.jpg" alt="Screen grab of NamesCo control panel" width="172" height="251" /><p
class="wp-caption-text">Screen grab of NamesCo control panel</p></div><p>This module has two key features:</p><p>1) it will take standard <strong>UrlRewrite</strong> code from an <strong>Apache .htaccess</strong> file and convert it to <strong>Zeus</strong> compliant code.</p><p>2) it will allow you to type in <strong>Zeus</strong> compliant code and validate it before writing it to the server root.</p><p>After much scrabbling around and an awful lot of trial and error, I found a post from a guy called <strong>Robert</strong> at <strong>www.emailmarketingsolution.co.uk</strong> that seemed to do the trick. The original post is up on the <a
title="Zeus Knowledge Hub" href="http://knowledgehub.zeus.com/index.php/internal/2007/11/23/zeus_communities?blog=16&amp;c=1&amp;page=1&amp;more=1&amp;title=zeus_communities&amp;tb=1&amp;pb=1&amp;disp=single" target="_blank">zeus community knowledge hub</a>.</p><p><strong>Zeus </strong>uses a completely different algorithm for its server control scripts and documentation is somewhat thin on the ground &#8211; most of the examples I found on the internet were just that, examples and hacks showing different approaches to solving pretty much the same problem.</p><p>I&#8217;m going to repeat Robert&#8217;s script here but add in a bit of background detail to show what it is actually doing</p><blockquote><p>RULE_0_START:<br
/> <em># begin rule, rules are separated into blocks in the Rewrite.Script</em><br
/> match IN:Host into $ with ^example<strong>\.</strong>com$<br
/> <em># examine the hostname to see if it doesn&#8217;t begin with www (note the backslash to escape the dot before the domain suffix)</em></p><p>if matched then<br
/> match URL into $ with ^/(.*)$<br
/> <em> # if there is a match, extract the rest of the path into a temporary variable ($1)</em></p><p>set OUT:Location = http://www.example.com/$1<br
/> <em> # now re-construct the header location, this time prefixing it with &#8216;www&#8217;</em></p><p>set OUT:Content-Type = text/html<br
/> set RESPONSE = 301<br
/> <em># tell Google (&amp; others) that this page has been permanently moved, so they update their records</em></p><p>set BODY = Permanently Moved<br
/> <em># human readable version of &#8217;301&#8242; message</em></p><p>goto END<br
/> endif<em></em></p><p><em># end rule</em><br
/> RULE_0_END:</p></blockquote><p>OK, so there you have it. That&#8217;s how to do some basic Zeus wrangling. There&#8217;s more documentation on the Zeus server at the <a
title="Zeus Knowledge Hub" href="http://knowledgehub.zeus.com/docs" target="_blank">Zeus Knowledge Hub web site</a>. I think the key documentation is the <a
title="Zeus TrafficScript Guide" href="http://knowledgehub.zeus.com/media/5.1/ZXTM_5.1_TrafficScript_Guide.pdf" target="_blank">TrafficScript Guide</a> but I&#8217;m not entirely convinced.</p><p>Additional: DRUPAL users<br
/> There&#8217;s also a complete Rewrite.script for Drupal users. Get it from the <a
title="Rewrite.Script for Drupal / Zeus" href="http://drupal.org/node/46508" target="_blank">main Drupal web site.</a></p> ]]></content:encoded> <wfw:commentRss>http://www.chichira.com/2009/03/30/namesco-zeus-server-301-redirects/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
