Currently, i have working with a Zeus server and we have a website which is developed using Wordpress. Zeus Sever don't support the .htaccess file which is required to install wordpress and also for the SEO. however, there is another way we can manage Zeus to achieve our tasks by defining some rewrite rules.
For WordPress we are currently Using the following Rewrite rules:
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?EUR(TM)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:
need a sub domain for our project:
Our hosting service provider "netregistry.com.au" is not based on Cpanel which makes our job harder to setup a Subdomain. Netregistry provide a tutorial which guide us to setup the subdomain.
http://www.netregistry.com.au/support/articles/create-a-subdomain-to-point-to-a-directory
however, to make the subdomain work we need to add some rewrite rule for the server Zeus.
The following rewrite rule we need to add:
RULE_1_START:
insensitive match IN:Host into % with ^www.example.com.au
if matched then goto END
RULE_1_END:
RULE_2_START:
insensitive match IN:Host into % with ^(.*).example.com.au
if matched then match URL into $ with ^/(.*)
if not matched then goto RULE_2_END
set URL = /%1/$1
RULE_2_END:
problem is we already have written rule 1 for the Wordpress. and if we place rule 1 again server will irnore the rule 1. Anyone have any idea how we can combine rewrite rules?
Please help us to combine WordPress and subdomain rewrite rule together