Articles in this section

How do I serve some requests from a different PHP front controller?

In your .upsun.app.yaml, you’ll want to declare an additional location block for /api, and include the directory that it should reference in the root key and the front controller for the site in the index key:

    locations:
        '/':
            root: 'public'
            passthru: '/index.php'
            rules:
                # Allow access to common static files.
                '\.(jpe?g|png|gif|svgz?|css|hbs|js|map|ico|bmp|eot|woff|woff2?|tiff?|jng|wbmp|otf|ttf|pdf)$':
                    allow: true
        '/api':
            root: 'public/sites/api'
            index: ['api.php']
            allow: true
            scripts: true
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.