Prev | Current Page 305 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

*)$ index.php/$1
A The rewrite condition that excludes the /xmlrpc/ directory from the final rewrite rule
Alternatively, in figure 11.4 we have illustrated a solution which you will appreciate if, like me, you are a
coward when it comes to the mystical art of mod_rewrite.
Licensed to Menshu You
Zend Framework in Action (Ch01) Manning Publications Co. 22
Figure 11.4 The directory structure with our xmlrpc controller file
What we??™ve done is added a .htaccess file with one line within our xmlrpc directory:
RewriteEngine off
This means we can drop our xmlrpc directory into any of the applications we are working on and any
requests to /xmlrpc/ will go to our xmlrpc/index.php file. This means that we don??™t have to tamper with what
could be a finely tuned .htaccess file belonging to the main application or several applications each with
potentially varying rewrite settings.
Now that requests are successfully getting to index.php we can add the code to forward those requests on
to the bootstrap file in our application directory. Readers of the previous chapter will already be familiar with
this setup and note the call to a new method; runXmlRpc() shown in listing 11.3.
Listing 11.3 The contents of our xmlrpc/index.php
include '.


Pages:
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
betsson meble drewniane ATC biuro rachunkowe gdańsk ubrania