Marketing & Affiliates
September 5th, 2009CakePHP on Zeus
February 28th, 2009Recently I have been developing a site using CakePHP. Its a great framework, has been a good learning curve too. For a simple brochure site Cake would be overkill, but for a site with database information it would be great. Any way my post is not about Cake or how good/bad it is… I was merely sharing what I had to do to get Cake to work on hosted Zeus server.
Now most people would know that Zeus servers do not read .htaccess files so I had to overcome the rewrite issue.
I initially followed this post, but I required some query string goodness on my search pages. I then found this post for CodeIgniter another PHP framework, which uses similar traits to Cake.
Combining the two rewrite scripts I came up with one that would work for my Cake application using query strings.
-
-
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:DOCROOT . /app/webroot/%{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
-
if not exists then
-
set URL = /app/webroot/index.php?url=%{SCRATCH:REQUEST_URI}
-
goto QSA_RULE_START
-
else
-
set URL = /app/webroot/%{URL}
-
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:
-
Hope this helps…
Spread the good stuff
June 11th, 2008Installing MySQL on Vista
May 18th, 2008Download the latest MySQL installer from the MySQL website. Once downloaded double click the installer.

Click Here to view how i made money on Forex trading.
Fiesty? Fawn?? Ubuntu???
April 5th, 2008Well in an attempt to learn some more randomness… I finally fixed my other computer that was laying around. I downloaded a few ISO’s of Ubuntu. Firstly 7.04 in 64bit flavour, then 7.10 in 32bit flavour. 7.10/32 was giving me install issues so I reverted to 7.04 with a side of 32bits. It worked fine. Amazing its running on a much slower machine… very little memory and appears to run smoother that vista! I also liked the idea of being able to command line installing software to create the webserver… made it very easy and was rather quick to install, configure and no hidden nasties. I reference this site… as it provided me with the necessary tools for a successful install of Apache, PHP and MYSQL on Ubuntu Feisty Fawn (7.04)
There are a few qwerks when a windows user moves into the Linux domain, but there is plenty of reference and help out there.
I will slowly move everything over to this linux choc top and play play play…




