Hi all:

I'm trying to install a CakePHP 2.0 app on a shared hosting account
with OVH, and I'm having a really hard time getting mod_rewrite to
work. After searching this group, I've found several people with the
same problem and talking about OVH's "exotic" Apache setup, but
without any specific details about how to set things up so that they
work, so I'm writing to see if anybody can give me a hand. Here are my
details:

1) I have a website with the web root at 'www/' (which is OVH's
standard setup), and I've created a subdomain, which is what I want my
Cake app to serve. The subdomain's web root points at 'www/
app_paintball/'; within this folder, I have the default CakePHP tree,
with no changes (i.e., the 'webroot/' folder is within the 'app/'
folder).

2) I've read the OVH guide about mod_rewrite (http://help.ovh.co.uk/
HtaccessModRewrite), and I've changed my .htaccess files accordingly.
For example, the one at CakePHP's root is now like this:

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

And the one inside /app/webroot/ is now like this:

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

3) The problem I'm having is that, for example, if I try to access a
URL like http://probando.mydomainname.com/Videos/ver, Cake responds
with an error saying "Error: VerController could not be found." (There
IS a "VideosController.php", and within it there IS  an action called
"ver"; in my local testing setup it all works perfectly). My
impression is that there's something in mod_rewrite that isn't working
correctly, and thus the Cake engine thinks that "ver" is the name of
the controller, when it's the action.

Things I've tried:

-Leave the .htaccess files as they came originally with CakePHP, but
just adding a "RewriteBase: /" before the rules.
-Point the subdomain's web root to '/www/app_paintball/app/webroot',
i.e., directly to the CakePHP's webroot.
-I also put a debug PHP script in the subdomain, to find out about
Apache's variables, and it says the following:

     DOCUMENT_ROOT = /homez.443/[my_username]/www/app_paintball
     SCRIPT_FILENAME = /homez.443/[my_username]/www/app_paintball/
[my_debugscriptname].php


Disclaimer: I just started learning CakePHP a week ago, and my
mod_rewrite knowledge has never been too great (and it's been years
since I had to touch it). I don't really know what else to do. Can
anyone help?


Paulo.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to