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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:00:41+00:00 2026-06-11T01:00:41+00:00

I have a site done with cakePHP and I access to the sites there

  • 0

I have a site done with cakePHP and I access to the sites there like:

http://example.com/site1

Which is converted to:

http://example.com/app/webroot/site1

As I’ve searched and seen here or searching here in stack-overflow this is the normal behaviour but I’d like that the user actually doesn’t see the app/webroot bit.

Is that possible?

Here is my current .htaccess:

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
   RewriteCond %{HTTP_HOST} !^$
   RewriteRule ^/?(.*) http://www.example.com/$1 [R=301,NE,L]

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

Thank you

  • 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-11T01:00:43+00:00Added an answer on June 11, 2026 at 1:00 am

    If you followed all the instructions to install CakePHP, the URL without /app/webroot should work too. If it is not working, re-download all the .htaccess files from the CakePHP repo. There are three files.

    To get rid of the /app/webroot, i.e. never see that path on any URL, you may edit or create a VirtualHost with a DocumentRoot pointing to the absolute path of your webroot.

    Something like this:

    <VirtualHost 127.0.0.2:80>
        DocumentRoot /absolute/path-to/app/webroot
    </VirtualHost>
    

    This is not possible if you are on a shared server. If you are on a managed VPS or dedicated server, you need to contact your hosting. If it is unmanaged, you can do it yourself.

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

Sidebar

Related Questions

For example I have site http://localhost/site In IIS I set that 404 error causes
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
so I have this site: http://webzilla-il.com/contactus.php , now i know it's not in english
I have a site using some ajax here: http://deezteez.com/ If you sort by Newest
I have site which is a creator of smaller websites, and I'd like to
I Have done a site but want to redirect it to another subdomain in
I am using codeigniter framework for my site and I have done two site
on my web site I want to have login/registration form in modal window done
I have site which uses $(selector).load(path) function in more than 300 pages. Now my
I have a site which is running in ASP.NET 4.0, on Windows 7 Ultimate.

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.