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

  • Home
  • SEARCH
  • 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 8898293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:34:36+00:00 2026-06-15T00:34:36+00:00

I tried this from my browser: http://example.com/contact But then I get Controller class ContactController

  • 0

I tried this from my browser:

http://example.com/contact

But then I get “Controller class ContactController could not be found” error

It doesn’t exist because “contact” is a folder name that isn’t a part of CakePHP application. It has 2 php files inside, but they works standalone. They are not CakePHP app files.

I tried this:

Router::redirect('/contact/*', 'http://example.com/contact/',
    array('status' => 302));

But I got this error from browser
“This webpage has a redirect loop“

How can I make a redirection so I don’t get this error?

  • 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-15T00:34:37+00:00Added an answer on June 15, 2026 at 12:34 am

    It’s possible adding a mod_rewrite rule.

    Suppose your app path is:

    /var/www/
    /var/www/app
    /var/www/app/webroot
    

    Add your folder “contact” to

    /var/www/contact
    

    Find the CakePHP .htaccess at

    /var/www/.htaccess
    

    This are the original contents:

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

    Add the rule bellow after the “RewriteEngine on” line

    RewriteRule  ^contact -               [L]
    

    It will look like this

    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteRule  ^contact -           [L]
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/$1 [L]
    </IfModule>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to use this snippet from the Soundcloud API: <script src=http://connect.soundcloud.com/sdk.js> <script> SC.initialize({
I have tried this example http://www.bennadel.com/blog/1056-ColdFusion-CFPOP-My-First-Look.htm , but it retrieve emails from POP server.
I am using the superfish menu from this example: http://users.tpg.com.au/j_birch/plugins/superfish/#examples (with Supersubs). It works
I've tried this example directly from MSDN: Dim Screens() As System.Windows.Forms.Screens and I can't
I tried to copy this example from this Multiprocessing lecture by jesse noller (as
I tried the solution from this thread , but I must be missing something
I have tried create this table, but nothing I have tried works from FKs.
I'm completely newbie in PHP. I have tried example code from this site .
When I tried some of the Asian sites (for example http://www.asahi.com/ ) it displayed
I found several solutions for creating Flash LSOs from JavaScript (for example: http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash )

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.