We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Webtools URL keeps multiplying

I access my webtools using the URL: localhost/webtools.php

When I click on Generate Scaffold, the URL becomes: localhost/public/webtools.php/webtools.php?_url=/scaffold/generate

When I click on list models, the URL becomes: localhost/public/webtools.php/webtools.php/webtools.php?_url=/models/list

When I click list controllers, the URL becomes: localhost/public/webtools.php/webtools.php/webtools.php/webtools.php?_url=/controllers/list

That means, each time I click on a link, webtools.php is appended again to the URL. And the page gets slower and slower to load. How to solve this? "localhost" is just an example and I am on a Virtual Host. Thanks.



43.9k
Accepted
answer

Hi,

if you've generated your app using pahlcon developer tools, in your config/config.php, do the following:


        //'baseUri'        => preg_replace('/public([\/\\\\])index.php$/', '', $_SERVER["PHP_SELF"]),
        'baseUri' => '/'

I was looking for webtools specific settings as my main app was working fine. Didn't know the main config is used for webtools also. Thanks. Got the issue solved.