Title: Multisite with Zeus
Last modified: August 19, 2016

---

# Multisite with Zeus

 *  [meeko](https://wordpress.org/support/users/meeko/)
 * (@meeko)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/multisite-with-zeus/)
 * Hello,
 * I ended up doing a network site BUT the hosting service surprisingly use only
   Zeus on their servers (I know, should have triple checked, long story), which
   means problems with .htaccess rewrite rules.
 * I found this bit of code on forum, which seems to work well, I can make the site
   work, BUT I haven’t figured out how to get blogs search for stylesheets and files
   from the right place..
 * I made up a sample blog at [http://stthomascrookes.org.uk/sample/](http://stthomascrookes.org.uk/sample/)
   which demonstrates this problem. Below is the rewrite.script code I’m using now.
 *     ```
       RULE_0_START:
       # Get the document root path and put value into the SCRATCH array.
       # This is the server path not the web URL.
       # e.g. /content/DesignerPlus/i/n/domain.co.uk/web/
       map path into SCRATCH:DOCROOT from /
   
       # Get the URL without the domain.
       # e.g. /test&colour=red
       # e.g. /blog/2007/10/31/an-example-post/?color=red
       set SCRATCH:ORIG_URL = %{URL}
       set SCRATCH:REQUEST_URI = %{URL}
   
       # See if there are any queries in our URL.
       match URL into $ with ^(.*)\?(.*)$
       # If there are…
       if matched then
       # Set a var to path without the domain part.
       # e.g. /blog/2007/10/31/an-example-post
       set SCRATCH:REQUEST_URI = $1
       # Set a var to the passed queries.
       # e.g. colour=red
       set SCRATCH:QUERY_STRING = $2
       endif
       RULE_0_END:
   
       RULE_1_START:
       # This is setting a var to the server path and sub folders.
       # e.g. /content/DesignerPlus/i/n/domain.co.uk/web//blog/2007/10/31/an-example-post
       set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
       set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}
   
       # Check to see if the file exists.
       look for file at %{SCRATCH:REQUEST_FILENAME}
       if not exists then
       # The file wasn’t found so is it a folder?
       look for dir at %{SCRATCH:REQUEST_FILENAME}
       if not exists then
       # No folder either. So now check the URL for special hosting folders.
       match SCRATCH:ORIG_URL into % with ^/webmail|^/tech_support|^/controlpanel
       if matched then
       # If a special folder was requested end the script.
       goto END
       else
       # There were no files, folders or special folders so set the new URL.
   
       # — Sub directory ————————————————————-
       # If the blog is in a sub directory…
       # e.g. /blog/index.php/2007/10/31/an-example-post
       match SCRATCH:REQUEST_URI into $ with ^/blog(.*)
       if matched then
       set URL = /blog/index.php$1
       # — Top level —————————————————————–
       # If the blog is in the top level of the site…
       # e.g. /index.php/2007/10/31/an-example-post
       else
       set URL = /index.php%{SCRATCH:REQUEST_URI}
       # If there is only a top level blog you can remove the
       # match and surrounding if statements.
       endif
       # — —————————————————————————
   
       # Go to the next rule.
       goto RULE_2_START
       endif
       endif
       endif
       # If files or folders were found end the rewrite script.
       goto END
       RULE_1_END:
   
       RULE_2_START:
       # Check for queries in the requested URL.
       match SCRATCH:ORIG_URL into % with \?(.*)$
       if matched then
       # If queries were found add them to the new URL.
       # e.g. /index.php/2007/10/31/an-example-post/&colour=red
       set URL = %{URL}&%{SCRATCH:QUERY_STRING}
       endif
   
       # — Sub directory ————————————————————-
       # If you only want to rewrite the sub directory uncomment this bit.
       match SCRATCH:ORIG_URL into % with ^/blog
       if matched then
       # — Sub directory ends ——————————————————–
   
       # End the script.
       goto END
   
       # — Sub directory ————————————————————-
       endif
       # — Sub directory ends ——————————————————–
       RULE_2_END:
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [munish.kumar](https://wordpress.org/support/users/munishkumar/)
 * (@munishkumar)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760442)
 * Same Issue with my site also .Please tell me if fixed.
 * I am facing problem with sub domains not working with zeus server >i don’t have
   any idea how to write rewrite.script. The rewrite.script file I am using not 
   including css and images and also the subdomain website’s admin not working following
   are the htaccess file I have used on apache and working perfectly.However the
   rewite.script file creating any.Does zeus support multiwebsite.Please reply it’s
   urgent.
 * ========htaccess=========================
    # BEGIN WordPress <IfModule mod_rewrite.
   c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L]
 * # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.
   php?file=$2 [L]
 * # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$
   $1wp-admin/ [R=301,L]
 * RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d RewriteRule
   ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
   RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] 
   </IfModule>
 * # END WordPress
    ==========end of htaccess=====================
 * =============rewite.script===================
    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: 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:
   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}&%{SCRATCH:QUERY_STRING} endif goto END QSA_RULE_END: =======
   ======end of rewrite.script=============
 *  [deeaayenn](https://wordpress.org/support/users/deeaayenn/)
 * (@deeaayenn)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760457)
 * I’m having the exact same problem!!!!
 * Anyone figure this out yet??!?!?!????
 *  [Developer ICAN](https://wordpress.org/support/users/richardicanie/)
 * (@richardicanie)
 * [15 years ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760476)
 * Hi anyone figure this one out?
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [15 years ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760477)
 * From the lack of responses you can assume no.
 *  [Developer ICAN](https://wordpress.org/support/users/richardicanie/)
 * (@richardicanie)
 * [15 years ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760478)
 * pity
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [15 years ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760479)
 * A few seconds on google helped.
 * [http://www.realisingdesigns.com/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/](http://www.realisingdesigns.com/2009/03/16/working-wordpress-mu-on-a-zeus-web-server/)
 * [http://www.benhuson.co.uk/2010/03/01/wordpress-permalinks-zeus-server/](http://www.benhuson.co.uk/2010/03/01/wordpress-permalinks-zeus-server/)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Multisite with Zeus’ is closed to new replies.

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [network](https://wordpress.org/support/topic-tag/network/)
 * [rewrite.script](https://wordpress.org/support/topic-tag/rewrite-script/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 6 replies
 * 5 participants
 * Last reply from: [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/multisite-with-zeus/#post-1760479)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
