title: Extracting URL parameters in cakephp with URL that ends with xml
body: <p>I would like to pass URL parameters in cakephp with URL that ends with xml like below;</p>
  
  <pre><code>http://localhost/cp251/controller/api_get_info?page=1.xml
  </code></pre>
  
  <p>The controller function looks like this;</p>
  
  <pre><code>public function api_get_info()
  {
      if($this-&gt;RequestHandler-&gt;responseType() == 'xml')
      {
          //Problem is that the code never executes inside this if statement
          //Controller action
  
      }
  }
  </code></pre>
  
  <p>The problem is that the code never executes inside the if statement <code>if($this-&gt;RequestHandler-&gt;responseType() == 'xml')</code>. However, if the URL becomes <code>http://localhost/cp251/controller/api_get_info.xml</code>, then the code will execute inside the if statement. Unfortunately, this is not what I want because the URL parameters cannot be sent.</p>
  
  <p>How can I pass URL parameters in cakephp with URL that ends with xml? I am using cakephp 2.5.1</p>
  
  <p>Thank you.</p>