ZEUS mod_rewrite config (Namesco, Register365)

976 views
Skip to first unread message

Smartrip

unread,
Mar 1, 2012, 5:45:26 AM3/1/12
to siwapp...@googlegroups.com
Hi all,

first of all thanks for great work, you save me some Euros :)

Anyway, while ZEUS servers (i.e. register365, namesco, etc. ) do support .htaccess files, much of the mod_rewrite functionality is not available.
However, you can use Zeus rewrite rules which work in a very similar way. All features, like printing, PDF generator, searching and file upload works without any additional work other than described in official installation manual (http://www.siwapp.org/blog/siwapp-installation-guide/).

You simply need to update .htaccess file, like showed below (remove mod_rewrite section):

Options +FollowSymLinks +ExecCGI
AddDefaultCharset utf-8 
<IfModule mod_authz_host.c>
  <FilesMatch "\.(lock|conf)$">
    Order deny,allow
    Deny  from all
  </FilesMatch>

  <FilesMatch "pre_.+\.php">
    Order deny,allow
    Deny  from all
  </FilesMatch>
</IfModule>

New URL rewrite rules should be placed in a file named rewrite.script in your web directory. All mod_rewrite rules defined in the .htaccess file would convert to:

# get the document root
map path into SCRATCH:DOCROOT from /
# initialize our variables
set SCRATCH:REQUEST_URI = %{URL}

# we skip all files with .something
# Apache mod_rewrite:
#  RewriteCond %{REQUEST_URI} \..+$
#  RewriteCond %{REQUEST_URI} !\.html$
#  RewriteRule .* - [L]
match URL into $ with \..+$
if matched then
match URL into $ with (/|\.php|\.feed|\.pdf|\.raw|/[^.]*)$
if matched then
goto END
endif
endif

# If no any .html, we redirect to our front web controller
# prepare to search for file, rewrite if its not found
# Apache mod_rewrite:
#  RewriteCond %{REQUEST_FILENAME} !-f
#  RewriteRule ^(.*)$ index.php [QSA,L]

# 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
    set URL = /index.php
set URL . %{SCRATCH:REQUEST_URI}
endif

# if we made it here then its a file or dir and no rewrite
goto END

 More information is available athttp://support.zeus.com/zws/media/docs/htaccess/tutorial.html You will be able to find a full and detailed explanation in the Zeus Web Server manual at support.zeus.com (This feature is only available on our Linux hosting packages).

I hope it will solve many of your problems, ans save 3 days of work, at least :)

Have fun folks!
F

JoeZ

unread,
Mar 1, 2012, 5:52:34 PM3/1/12
to siwapp...@googlegroups.com
wow!!! impressive.
Reply all
Reply to author
Forward
0 new messages