Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 864911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:33:24+00:00 2026-05-15T09:33:24+00:00

I suffered a CakePHP Route Problem. I can only access the root / and

  • 0

I suffered a CakePHP Route Problem. I can only access the root “/” and it shows the CakePHP default welcome home page. Later I try to write my controller (icons_controller.php) and views (views/icons/index.ctp), it has problem. I typed in http://localhost:8080/myapp/icons/ It always says “Not Found The requested URL /myapp/icons/ was not found on this server.” In my routers.php file it has:

Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));

I create a controller in the icons_controller.php file like:

<?php
class IconsController extends AppController{
 var $name = 'Icons'; 
 function index() {
  $this->set('icons', $this->Icon->find('all'));
 }
}
?>

And it should simple open the file with only a paragraph tag text (in /views/icons/index.ctp)

<h1>My Icons</h1>

But I cannot open the index.ctp by using localhost:8080/myapp/icons/. So later I tried to modify my routers.php file like this, it works fine with the url http://localhost:8080/myapp/:

Router::connect('/', array('controller' => 'icons', 'action' => 'index'));
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));

It is fine and success display the “My Icons” text. Wondering why only works under “/”, with anything else doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:33:24+00:00Added an answer on May 15, 2026 at 9:33 am

    Check to make sure that you have mod_rewrite enabled on Apache.

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've suffered in using adb.exe . I wanted to use adb.exe shell prompt same
The company I work in has suffered a major server failure. During this failure
Has the menu & toolbar customization functionality in VS2010 been reduced? I can't seem
I will try and be brief, I am finding when trying to create a
I have implicitly made this a community wiki seeing that the answers can be
Our development server has suffered some configuration mismatch on recent update to PHP 5.3,
I don't know if I have suffered some brain or sight damage, but I
From what I recall of a not too distant past, Javascript interpreters suffered from
I have suffered about JumboEnumSet, but did not find much information about. when and
I realized that many of my past projects have suffered from too much ajax.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.