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 8304409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:50:40+00:00 2026-06-08T17:50:40+00:00

I am coding on cakephp 1.3. I have a problem redirecting the page to

  • 0

I am coding on cakephp 1.3. I have a problem redirecting the page to index.html.

My index.html is inside webroot folder.
What I know cakephp will directly redirect to index.html.

When I using URL it is showing error..

Error: Controller could not be found.

Error: Create the class Controller below in file: app/controllers/controller.php

<?php
class Controller extends AppController {

    var $name = '';
}
?>

I have followed some link but it not seems to work.
I have checked on Google also.

How can I append .html to all my URLs in cakephp?

  • 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-06-08T17:50:41+00:00Added an answer on June 8, 2026 at 5:50 pm

    You can’t replace CakePHP’s own index.php or CakePHP will stop working. Normally you can put files in webroot and it would work without problems, but the root file is a bit more trickier, since (AFAIK) you can’t use Cake’s routing only to display a non-CakePHP file.

    Put your html file in a view in any controller and route the root directory there. For example, name the file index.ctp and put it in app/views/static_pages/index.ctp.

    Router:

    Router::connect('/', array('controller' => 'static_pages', 'action' => 'index'));
    

    Controller (static_pages_controller.php):

    class StaticPagesController extends AppController {
        function index() {
            // no need to do anything except use no layout file
            $this->layout = false;
        } 
    }
    

    Model (static_page.php):

    class StaticPage extends AppModel {
        // don't use a database for this model
        var $useTable = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have css and js inside webroot folder, but all are not loading ...
I have an experience with CakePHP and now started coding on ASP.NET MVC framework.
Coding Platform ASP.NET 4.0 WebForms on IIS7.5 If I request a page blahblah.aspx which
Coding footer naively, if there's not enough content, then there will be empty space
When coding, I use Dropbox to sync folder in which I keep my projects
i mainly use PHP and I have been coding using it for a while.
I have a list page with a filter form and Im submitting the form
I am coding a blog in CakePHP in order to get myself started with
I am having a really frustrating problem in CakePHP where a space keeps coming
I'm developing a application with CakePHP, and I have two layouts: one for the

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.