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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:50:37+00:00 2026-06-02T10:50:37+00:00

Having trouble configuring CakePhp on an Apache server. It worked fine in my dev

  • 0

Having trouble configuring CakePhp on an Apache server. It worked fine in my dev environment, and now I’m looking to deploy.

The url will look like:

"http://www.example.com/mysite/"

A sample controller action would be:

"http://www.example.com/mysite/users/login"

Using the default htaccess files doesn’t seem to work.

mod_rewrite is loaded according to phpInfo, and it is rewriting urls, but it sees /mysite/ as a controller.
Here is the output and my .htaccess files

Missing Controller

Error: MysiteController could not be found.

Error: Create the class MysiteController below in file: >app/Controller/MysiteController.php

root:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

app:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$    webroot/    [L]
    RewriteRule (.*) webroot/$1    [L]
</IfModule>

webroot:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

Should I be looking to change my .htaccess files, or my CakePhp config file? I’ve tried a few different RewriteBases, only managed to get different errors.

Edit: The server is running php-cgi and it appears all of my links are being written to a cgi-bin. For example:

$this->Html->meta('icon');

writes the path “/cgi-bin/cgiwrap/w3u_mysite/mysite/favicon.ico”
Any idea as to where or why this could be happening?

  • 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-02T10:50:38+00:00Added an answer on June 2, 2026 at 10:50 am

    As suspected in my edit, the problem was related to the server running cgi php. I’m not exactly sure what the issue was, but the CakePhp google group provided this solution:

    In app/Config/core.php there is a commented out definition for App.baseUrl. Uncomment it and replace with the following

    Configure::write('App.baseUrl', '/mysite/');
    

    Above it, there are comments saying to remove the .htaccess files that you should ignore. The site worked fine with the .htaccess files as their standard values, no RewriteBase needed. The one annoyance was that $this->Html->css() and $this->Html->js() functions did not work, but I only call them in templates, so it’s not terrible to hard code them.

    If anyone has insight into the cause of these cgi woes, please share. It still feels a bit like a kludge if I can’t use all of the Html helpers.

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

Sidebar

Related Questions

I'm having serious trouble configuring my OpenLDAP server to have the memberOf overlay enabled.
I'm having trouble configuring Postfix to deliver e-mail via relay to Sendgrid. I get
I'm having some trouble installing and configuring qt on my vista laptop. I'm trying
i am having trouble configuring mysql database to connect to the right file. I
I am having trouble in configuring WCF service to run in session mode. As
I'm having big trouble in configuring Ruby and MySQL on MacOSX. Just a fact,
Hey everyone, I'm having trouble configuring my remote debugging set up. I've been searching
I have a hosted site and I'm having trouble configuring Joomla (running Joomla +
I'm having some trouble configuring a SQL statement to perform an openquery on LDAP
I am having trouble configuring the Sonar XML plugin . I am trying to

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.