Skip to content

Updating to Phalcon 4: App->handle() URL problem #15510

Answered by quasipickle
quasipickle asked this question in Q&A
Discussion options

You must be logged in to vote

Nothing like a lunch break to clear the head.

The answer was to modify the URL being passed, to trim off the part of the URI that refers to the subdirectory. So now I have:

$rooted_uri = substr($_SERVER["REQUEST_URI"],strlen($Config->dirs->web));
echo $App->handle($rooted_uri)->getContent();

With $Config->dirs->web being "/appname", the URI passed to $App->handle() becomes just /, and the routing & dispatching looks like its working.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by quasipickle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant