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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:33:42+00:00 2026-06-09T13:33:42+00:00

I have a LAMP server configured with DocumentRoot /var/www changed to VirtualDocumentRoot /var/www/%-3/ in

  • 0

I have a LAMP server configured with DocumentRoot /var/www changed to VirtualDocumentRoot /var/www/%-3/ in the Apache2 config file – this allows me to automatically map /var/www/<subdomain> to <subdomain>.example.com.

I’m currently in the process of learning CakePHP (2.x), with Cake in directory /var/www/foo/; I’ve noticed that the URLS aren’t redirecting properly, and am attempting to resolve this issue; as per http://bit.ly/KmEhHl, I’ve modified the default .htaccess file to (among other things):

RewriteBase /cake
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]

But this raises a 500 Internal Server Error – checking Apache2’s error.log and rewrite.log, this is because .htaccess is causing an infinite redirect, and is appending app/webroot to the URI.

From my understanding, the L flag here should indicate ‘last rule’ – I’m assuming that this error is due to my poor understanding of mod_rewrite, but I’m not sure exactly where this is happening. Would the error be because of some other latent issue with this setup? I’m aware that there have been several questions on this already, and will update if any new information can be found on my end. Any help would be greatly appreciated!

  • 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-09T13:33:43+00:00Added an answer on June 9, 2026 at 1:33 pm

    Found an answer!

    Full answer courtesy of user ‘kostasz’ at http://bit.ly/NSDWE2 in comments.

    The hint was indeed the infinite redirect – using RewriteBase /cake was not the correct base URL.

    To fix this issue, add RewriteBase / to each of the .htaccess files in /, /app/, and /app/webroot/.

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

Sidebar

Related Questions

So I have a server set up (LAMP) server, this proxy has access to
I have a LAMP server where I've run the following commands to set permissions
I have setup the basic LAMP server on Ubuntu 11.10 and had a few
I have a PHP script running on my LAMP server that requires certain files
I have a php mail script sitting on a LAMP vps server. The script
I have a standard LAMP server, and currently there is a way to attach/upload
I have set up a LAMP server on aws. I am planning to create
I have some basic pageview incrementing code set up on a LAMP server (see
I have installed and configured LAMP to run on my Ubuntu 11.10. Now I
I've got a LAMP dev server at something like dev.example.com. Eventually this will be

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.