Question

Setting up a new page on-top of an existing kohana environment. I changed the httpd.config to be the following.

Virtual hosts

Include conf/extra/httpd-vhosts.conf

<virtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "C:/wamp/www/site/kohana"
    ServerName localhost
</virtualHost>
<virtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "C:/wamp/www/site/kohana"
    ServerName localhost
    <directory "C:/wamp/www/site/kohana">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </directory>
</virtualHost>

This allowed me to type in localhost and hit the homepage of the site. But for some reason I can only access the page which is defined in the bootstrap.php route

Route::set('default', '(<controller>(/<action>(/<id>)))')
    ->defaults(array(
        'controller' => 'account',
        'action'     => 'index',
    ));

After I go to the Account page and attempt to redirect somewhere else. I get a 404 error from apache. I assume its from apache because the error isnt thrown from kohana.

Not Found

The requested URL /reviews was not found on this server.

does anyone have suggestions as to what i should look at?

No correct solution

OTHER TIPS

I think in url you have skiped the file index.php

Perhaps if you type url into your web browser like this, it should work:

localhost/index.php/<controller>/<action>

not like this:

localhost/<controller>/<action>

Check, is apache mod_rewrite enable and loaded at phpinfo(); In My case I've just enable mod_rewrite at apache.

 sudo a2enmod rewrite 

and than restart

sudo systemctl restart apache2

Check .htaccess rules.

And make sure you have Controller_Welcome class, method in it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top