Jump to content


Photo

Installing on a Zeus Server


  • Please log in to reply
3 replies to this topic

#1 n00dles101

n00dles101

    Jr. Member

  • Members
  • PipPip
  • 14 posts
  • 0

Posted 21 January 2011 - 06:59 AM

Hi,

Great CMS, really loving it....

Only problem, tried to install on my live host and discovered its running Zeus instead of Apache.
So after spending a night converting a site I find I can't put it up live.

Anyone successfully converted the .htaccess file for Processwire to Zeus Script ??

Any help greatly appreciated...

Mike

#2 adamkiss

adamkiss

    Master of the universe

  • Moderators
  • 1,078 posts
  • 289

Posted 21 January 2011 - 07:19 AM

Hi, welcome to forums!

This should be .htaccess documentation on ZEUS 4.3. Although quite old, seems that it's still 'active', i.e. still works.

http://support.zeus....s/tutorial.html

Good luck and let us know if it helps and how far you got!

#3 n00dles101

n00dles101

    Jr. Member

  • Members
  • PipPip
  • 14 posts
  • 0

Posted 21 January 2011 - 10:33 AM

Ok,

have a basic one up and running which will allow the site to function correctly.

Just copy the code below into a file on your root directory called "rewrite.script"

It does not include the security stuff at the start of the .htaccess file.

I'll repost it when I work it out.

but for now this should allow you to run PW on a Zeus Server.

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?it=%{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:


#4 adamkiss

adamkiss

    Master of the universe

  • Moderators
  • 1,078 posts
  • 289

Posted 21 January 2011 - 10:51 AM

Great,

thanks Noodles!

I believe that Ryan will move this into FAQ section as helper how it could work.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users