code: public function setRedirect($hostname)
      {
          if (!empty($hostname))
          {
              $this->redirect = new URL($hostname); 
              $this->redirect->set('path', rtrim($this->redirect->path, '/'));
          }
          else
              $this->redirect = false;
          return $this;
      }
docs: Configure this VirtualHost to be a redirect to another location
  @param mixed $hostname A string or a URL object where to redirect to. Can be empty to disable redirecting
  @return Wedeto\Application\VirtualHost Provides fluent interface