title: cakephp zeus server
body: <p>I am having trouble installing a cakephp app onto a hosting company this is running a zeus server. It is working fine on my apache, but for reasons outside of my control I have to transfer it.</p>
  
  <p>I am getting missing controller in the app. I have it in a sub directory called osm</p>
  
  <pre><code>Error: Create the class LoginController below in file: app/Controller/LoginController.php
  </code></pre>
  
  <p>I put a rewrite.script in the root of the app, app folder, webroot. This allowed access to the conrollers and the login but all the css, js was missing.</p>
  
  <p>So I uncommented the line in core.php </p>
  
  <pre><code>Configure::write('App.baseUrl', env('SCRIPT_NAME'));
  </code></pre>
  
  <p>Now I cant get access to the controllers but I do have the css and js now.</p>
  
  <p>Cant see what I am missing from the examples I have seen.</p>
  
  <p><strong>if I now use index.php in the url it does work
  <a href="http://www.mydomain.com/osm/index.php/login" rel="nofollow">http://www.mydomain.com/osm/index.php/login</a></strong></p>
  
  <p>rewrite.script:</p>
  
  <pre><code>    # 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:
  
      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 = osm/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:
  
      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;%{SCRATCH:QUERY_STRING}
      endif
      goto END
      QSA_RULE_END:
  </code></pre>