Can't get simple doophp demo to work, links broken

684 Views Asked by At

I follow this doc. http://www.phpbuilder.com/columns//doophp/Jason_Gilmore03292011.php3

doophp seems lightweight and simple.

When I run http://localhost/doophp/app/about, I get the result:

Oops! This link appears to be broken.

How can I fix this?

2

There are 2 best solutions below

0
On

You need to configure your routes in /protected/config/routes.conf.php think of this config file as your mod_rewrite ... it tells what url goes to what controller...

The example below demonstrates the "default page to load on the root directory... it will load the index() function found in the HomeController...

$route['*']['/'] = array('HomeController', 'index'); 

Or if you need to pass a querystring along with your URL... then you use /:QueryStringName

$route['*']['/some_page/:someQueryStringValue'] = array('PageController', 'my_paging_function');

--

Also make sure the correct controller exists in the /protected/controller folder

Its important to note, that the route URLs should not end with forward slash

0
On

It works, need to change the file name of htaccess.example to .htaccess