Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Not Beautiful URLs

Is there a way to disable Beautiful URLs and work with simple urls like index.php?r=index/help ?? And generate that links by url() function in view



2.6k
Accepted
answer
edited Mar '14

My 2 cents:

  1. Don't use the .htaccess
  2. Set the baseUri in your url resource ($di->set('url', function() { .....)

see: http://docs.phalconphp.com/en/latest/reference/url.html#producing-urls-without-mod-rewrite

<?php
$di->set('url', function() {
  $url = new Phalcon\Mvc\Url();

  //Pass the URI in $_GET["_url"]
  $url->setBaseUri('/index.php?r=/');

  return $url;
});