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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:41:08+00:00 2026-05-19T02:41:08+00:00

(Not sure if this belongs here or on webmasters; please move if necessary.) I’m

  • 0

(Not sure if this belongs here or on webmasters; please move if necessary.)

I’m a total newbie to Cake and not much better with apache; I’ve done
a lot of PHP but always with a server that’s already been set up by
someone else. So I’m going through the basic blog tutorial, and it
says:

A Note On mod_rewrite
Occasionally a new user will run in to mod_rewrite issues, so I’ll
mention them marginally here. If the Cake welcome page looks a little
funny (no images or css styles), it probably means mod_rewrite isn’t
functioning on your system. Here are some tips to help get you up and
running:

Make sure that an .htaccess override is allowed: in your httpd.conf,
you should have a section that defines a section for each Directory on
your server. Make sure the AllowOverride is set to All for the correct
Directory.

Make sure you are editing the system httpd.conf rather than a user- or
site-specific httpd.conf.

For some reason or another, you might have obtained a copy of CakePHP
without the needed .htaccess files. This sometimes happens because
some operating systems treat files that start with ‘.’ as hidden, and
don’t copy them. Make sure your copy of CakePHP is from the downloads
section of the site or our SVN repository.

Make sure you are loading up mod_rewrite correctly! You should see
something like LoadModule rewrite_module libexec/httpd/mod_rewrite.so
and AddModule mod_rewrite.c in your httpd.conf.”

I’m using XAMPP on linux. I’ve found my httpd.conf file in opt/lampp/
etc, but am not sure what I need to do with it. I’ve searched for
“rewrite”, and there’s only one line:

LoadModule rewrite_module modules/mod_rewrite.so

There’s nothing about AddModule mod_rewrite.c.

Do I just create a Directory section for the directory I’ve installed
Cake in and set AlllowOverride to All? (I created a separate
subdirectory of my wwwroot and installed in there, since I also have
installs of Joomla and CodeIgniter.) Is there anything else I need to
do? My download of Cake did come with two htaccess-type files
(._.htaccess and .htaccess) – do I need to do anything with them?

Thanks for any help you can provide to this non-server-admin.

EDIT TO ADD virtual host sample:

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
  • 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-19T02:41:09+00:00Added an answer on May 19, 2026 at 2:41 am

    Step 1. You should have mod_rewrite enabled, check using <?php phpinfo();

    Step 2. Check AllowOverride

    // I believe you already did that. 
    // Make sure you are doing it for the correct webroot!
    <Directory />
       AlllowOverride to All
    </Directory>
    

    Step 3. Check your default .htaccess files are there in directories /mypro, /mypro/app, /mypro/app/webroot.

    Step 4. .htaccess may need path fixes depending upon your cake project installation.

     e.g. project url http://localhost/mypro/app/webroot/
     /mypro/app/webroot/.htacess
     <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule    ^$ mypro/app/webroot/    [L]
        RewriteRule    (.*) mypro/app/webroot/$1 [L]
     </IfModule>
    

    EDIT

    If you are trying to setup it as local domains, Setup local domains (on windows) with WAMP configured
    Note: this may be tweaked a little for different kind of installations
    Find your hosts file (mine is located at C:\WINDOWS\system32\drivers\etc\hosts)
    Insert this to bottom

    # save and close this file named hosts
    127.0.0.1       mypro.localhost
    

    To test hostname open command prompt and run ping mypro.localhost # If ping is good then move on

    Now open your apache config file 
    httpd.conf and httpd-vhosts.conf (my files are located at)
    
    C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf
    # uncomment line below
    Include conf/extra/httpd-vhosts.conf
    C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf
    # Insert virtual host entries like this, trim dummy entries (if any)
    
    # Changing DocumentRoot
    <VirtualHost *:80>
        DocumentRoot "C:/wamp/www"
        ServerName localhost
    </VirtualHost>
    <VirtualHost *:80>
        DocumentRoot "C:/wamp/www/mypro/app/webroot"
        ServerName mypro.localhost
    </VirtualHost>
    

    Save and close files

    Create directory C:/wamp/www/mypro (if you haven’t created before)

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

Sidebar

Related Questions

Not sure if this really belongs here, so please move it if it doesn't.
Not sure if this belongs here or at webapps... please move if appropriate. I
I am not sure if this belongs to superuser. Please excuse. Here is what
I'm not entirely sure if this question belongs here; if not, please let me
I'm not sure whether this question belongs on StackOverflow or SuperUser, but here goes
-not sure if this belongs here or on serverfault- What I want to do
I am not sure if this question belongs here or superuser (or other). If
Not sure if this belongs here or on ServerFault, but I wonder if someone
I am not sure if this question belongs on StackOverflow but here it is.
Not sure if this belongs here because its not technically a 'programming' question, but

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.