2
votes

I'm using CakePHP 2.0 for my website frameworks, I located my cakephp files on server but i have some problems, named Server Internal Error 500, I don't know what i supposed to do, the other pages is working well, but some pages is encountered a 500 server internal error, I've checked the controller, view, model, and they said is no error detected, but the firebug says, the view is missing, this is my .htaccess file

public_html/cakephp/

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

public_html/cakephp/app

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

public_html/cakephp/app/webroot

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

I already following steps, by adding / ex: app/webroot/ to /app/webroot/ and webroot/ to /webroot/ but still not works for me, i need to steps up to the next project, but this problem is bugging my day.

4

4 Answers

2
votes

You are using mod_userdir, when using that indeed you need the RewriteBase, as mod_rewrite removes the ~ charachter

RewriteBase /~magang/smkn1pst

in all 3 .htaccess files should work, as it does for me

Currently one of your files is missing this line

0
votes

i am not sure please try

RewriteBase /smkn1pst/
0
votes

I had a similar problem (static files were redirected properly with the correct RewriteBase in the root htaccess).

It turned out (after 4 hours of debugging .htaccess) that my FTP client had skipped the app/tmp/ directory because of a rule I added myself.

That also yielded a 500 error.