Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed advice with routing in Symfony2
    primarykey
    data
    text
    <p>I'm quite new to symfony2 and I need some help with its routes.</p> <p>I'm working on a bundle that works quit like a service. It receives data through QUERY_STRING and process this data according to internal rules and store its result in the database. For now, let's assume that this bundle is accessed by this route: <a href="http://myhost.com/processing" rel="nofollow">http://myhost.com/processing</a></p> <p>Calling this service through my computers browser works fine, as it should. So, here comes the problems.</p> <p>1) The device that access this URL do not understand redirects; 2) I've to mask this URL with something like: <a href="http://myhost.com/proc.php" rel="nofollow">http://myhost.com/proc.php</a>, because some devices are with this URL and we cannot change them, so, my service has to be available at this two URLs.</p> <p>Please, could you give me some advices about this? If you need additional informations, please, let me know.</p> <hr> <p>My routes were:</p> <p>Global routing.yml</p> <pre><code>xx_processing: resources: "path/bundle/routing.yml" prefix: /proc.php options: expose: true </code></pre> <p>Bundle routing.yml</p> <pre><code>xx.processing.processing.index: pattern: / defaults: { _controller: XxProcessingBundle:Processing:index } </code></pre> <hr> <p>With the configuration above, when my device request <a href="http://myhost.com/proc.php?qs" rel="nofollow">http://myhost.com/proc.php?qs</a>, it is redirected to <a href="http://myhost.com/proc.php/?qs" rel="nofollow">http://myhost.com/proc.php/?qs</a>. After this redirection, the device get lost and the requisition is not processed.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload