There are my unmodified .htaccess files:

path_to_app/.htaccess:

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


path_to_app/app/.htaccess

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


path_to_app/app/webroot/.htaccess

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


Jason Huebel

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of internettitan
Sent: Friday, January 19, 2007 4:11 PM
To: Cake PHP
Subject: Re: webroot issue (i think)


what should the 3 files look like?

how do i avoid the 500 error?

On Jan 19, 9:51 am, "milliseconds" <[EMAIL PROTECTED]> wrote:
This one had me going for about three hours last night. It turns out
there are three .htaccess files in the Cake file structure which need
to exist. Some operating systems hide them and are not copied to the
server.

Make sure there is a .htaccess file in the following locations:

First:
../path_to_cake_install/.htaccess

Second:
../path_to_cake_install/app/.htaccess

Third
../path_to_cake_install/app/webroot/.htaccess

Once I finally got the .htacccess files installed in the proper places
it worked fine.

Good Luck

Mac

On Jan 18, 3:56 pm, "internettitan" <[EMAIL PROTECTED]> wrote:

> Hey all,

> I am trying to migrate an existing cake php site to a new hosting
> provider and am running into a problem (probably due to my own
> inexperience).

> I took a zip of the site sent to me by the original developer and
> plopped it into the html directory of the new host (where html is the
> webroot).

> I setup and populated a mySQL database and changed the files to
> correctly point to this database.

> The homepage comes up fine....BUT none of the links work!

> 3 other symptoms that may be associated:

> 1) at first the site gave an error 500 which according to the hosting
> support team was due to the contents of the htaccess file...

> "Thank you for contacting technical support regarding your issue. We
> apologize for the inconvenience. An .htacess file in your FTP root
> directory contained some mod_rewrite rules that were causing a redirect
> loop:

> [Tue Jan 16 16:56:44 2007] [error] [client 66.223.59.30] mod_rewrite:
> maximum number of internal redirects reached. Assuming configuration
> error. Use 'RewriteOptionsMaxRedirects' to increase the limit if
> neccessary.
> [Tue Jan 16 16:56:44 2007] [error] [client 66.223.59.30] Request
> exceeded the limit of 10 internal redirects due to probable
> configuration error. Use 'LimitInternalRecursion' to increase the limit
> if necessary. Use 'LogLevel debug' to get a backtrace.

> I have renamed the .htaccess file to .htaccess.old and your site and
> admin page are accessible now.

> Please note that the document root directory of your web site is the
> /html directory under your FTP account. At this time, it appears your
> web files have been uploaded to your FTP root directory instead, where
> they will not be accessible via a browser. Please re-upload your web
> contents to the /html directory under your FTP site. This may be why
> your mod_rewrite rules are not functioning properly, but as we cannot
> provide technical support for custom code like mod_rewrite rules, we
> recommend having your web developer or programmer check them before
> re-enabling your .htaccess file."

> 2) After the .htaccess was removed the home page still had problems in
> that it could not access the images referenced on the page. I moved the
> rest of the app/webroot files to the html directory and viola!

> 3) I am even a little stumped as to how the site is working at all. I
> have made several changes to the thtml files and cannot see any update
> to the page at all

> Thanks for any help you can give!




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to