hummm ..some of the rules are messing the rewrite (not sure). Try keep
only the one in webroot. An other trick, I have an OVH domain and I
needed to add rewriteBase in order it to work.
My webroot is alpha under the www (but my application and the cake
directory are not under www). I added rewriteBase /alpha in
the .htaccess of the webroot (ie : alpha for instance). Another
problem I had with OVH, I needed to disable the gzip in htaccess in
order to make it work with PHP 5 (maybe the corrected that bug since).

On Sep 4, 9:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Index.php ( I deleted the comments ):
>
> <?php
> if (!defined('DS'))
>      define('DS', DIRECTORY_SEPARATOR);
>
> if (!defined('ROOT'))
>      define('ROOT', dirname(dirname(dirname(__FILE__))));
> if (!defined('APP_DIR'))
>      define('APP_DIR', basename(dirname(dirname(__FILE__))));
> if (!defined('CAKE_CORE_INCLUDE_PATH'))
>      define('CAKE_CORE_INCLUDE_PATH', ROOT);
>
> if (!defined('WEBROOT_DIR'))
>      define('WEBROOT_DIR', basename(dirname(__FILE__)));
> if (!defined('WWW_ROOT'))
>      define('WWW_ROOT', dirname(__FILE__) . DS);
> if (!defined('CORE_PATH')) {
>      if (function_exists('ini_set')) {
>           ini_set('include_path', CAKE_CORE_INCLUDE_PATH .
> PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR .
> ini_get('include_path'));
>           define('APP_PATH', null);
>           define('CORE_PATH', null);
>      } else {
>           define('APP_PATH', ROOT . DS . APP_DIR . DS);
>           define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
>      }}
>
> if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php'))
>     trigger_error("Can't find CakePHP core.  Check the value of
> CAKE_CORE_INCLUDE_PATH in app/webroot/index.php.  It should point to
> the directory containing your " . DS . "cake core directory and your
> " . DS . "vendors root directory.", E_USER_ERROR);
> if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
>     return;} else {
>
>      $Dispatcher = new Dispatcher();
>      $Dispatcher->dispatch($url);}
>
> if (Configure::read() > 0)
>     echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
> ?>
>
> /.htaccess:
> <IfModule mod_rewrite.c>
>    RewriteEngine on
>    RewriteRule    ^private/$ private/index.php [L] # private section,
> used to 
> redirecthttp://www.maryphoto.be/privatetohttp://www.maryphoto.be/maryphoto/webroot/private/index.php
>    RewriteRule    ^$ maryphoto/webroot/accueil.php [L] # I am
> upgrading my website to cakePHP, so I redirect visitors to accueil.php
> to see the "old" one.
>    RewriteRule    (.*) maryphoto/webroot/$1 [L]
> </IfModule>
> SetEnv PHP_VER 5 # Used on OVH to activate PHP5
>
> /maryphoto/.htaccess:
> <IfModule mod_rewrite.c>
>     RewriteEngine on
>     RewriteRule    ^$    webroot/    [L]
>     RewriteRule    (.*) webroot/$1    [L]
> </IfModule>
>
> /maryphoto/webroot/.htaccess:
> <IfModule mod_rewrite.c>
>     RewriteEngine On
>     RewriteCond %{REQUEST_FILENAME} !-d
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> </IfModule>
>
> Hope it will help, Fabian Pijcke.
>
> On Sep 4, 9:03 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > Well if all links are wrong, it's problem of mod-rewrite and/or
> > index.php. What platform do you use ?
> > Can you paste your .htaccess and webroot/index.php in the bin or by
> > mail ?
>
> > On Sep 4, 8:45 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > I have this problem for all my URL's, the images cannot be found ( url
> > > searched:http://www.server.com/home/maryphot/www/maryphoto/img/image.ext
> > > in place ofhttp://www.server.com/img/image.ext), my form's actions
> > > have the same problem.
>
> > > My CSS cannot be found anymore.
>
> > > I can solve some problems by updating my app/webroot/index.php but I
> > > don't know how to alter it to get all the thing running ...
>
> > > Looking at the html.php helper, I think that it's its $webroot member
> > > that is altered ...
>
> > > die($this->webroot); ===> /home/maryphot/www/maryphoto
>
> > > (The real absolute dir on my server is: "/home.10/maryphot/www/
> > > maryphoto", I don't know if it helps ... ?)
>
> > > Thank you again !
>
> > > Pijcke Fabian
>
> > > On 4 sep, 20:35, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > > Do you have same problems for other links ? Check also your index.php
> > > > in webroot ..
> > > > All this seems a configuration problem to me.
>
> > > > On Sep 4, 8:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi again,
>
> > > > > I changed it to PagesController to SpagesController and nothing
> > > > > changed: my links are as ugly as before :(
>
> > > > > I also tried to modify my .htaccesses but the result was really
> > > > > disturbing so I resetted them to the officials ones ...
>
> > > > > Thank for your help anyway !
>
> > > > > On 4 sep, 20:23, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > > > > Pages is reserved, try with a new name and let know about the 
> > > > > > results.
>
> > > > > > On Sep 4, 8:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi, thanks for your answer :)
>
> > > > > > > Yes, mod_rewrite is installed on my server ...
>
> > > > > > > I'll use $html->link instead of my beginners technic ^^
>
> > > > > > > My controller's named PagesController, I'll change for
> > > > > > > SpagesController ( Static pages )
>
> > > > > > > Thank you again, have somebody idea's for my url's issue ?
>
> > > > > > > On 4 sep, 19:58, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Strange, have you got mod-rewrite set up ?
> > > > > > > > By the way instead of :
>
> > > > > > > > <a href="<?php echo $html->url('/pages/magasin/Mouscron'); ?
>
> > > > > > > > >">Mouscron</a><br />
>
> > > > > > > > you could use echo $html->link('Mouscron', '/pages/magasin/');
>
> > > > > > > > What is the name of your controller ? "Pages" is a "reserved" 
> > > > > > > > name for
> > > > > > > > static pages in cakePhp.
>
> > > > > > > > On Sep 4, 6:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
> > > > > > > > wrote:
>
> > > > > > > > > Hi there,
>
> > > > > > > > > I'm new to cakePHP and trying to create a simple application, 
> > > > > > > > > but I
> > > > > > > > > have a problem with the html helper and also I think the 
> > > > > > > > > Router
> > > > > > > > > class ...
>
> > > > > > > > > So I just created a controller with no model associated and 2 
> > > > > > > > > views
> > > > > > > > > named "index.thtml" and "magasin.thtml".
>
> > > > > > > > > These pages are accessible via 
> > > > > > > > > "http://www.server.com/pages/index"; and
> > > > > > > > > ("http://www.server.com/pages/magasin/Mouscron"; or 
> > > > > > > > > "http://www.server.com/pages/magasin/Leers-Nord";) ( the 
> > > > > > > > > controller attributes
> > > > > > > > > different variables according to the parameter ).
>
> > > > > > > > > In index.thtml, I wrote:
>
> > > > > > > > > <a href="<?php echo $html->url('/pages/magasin/Mouscron'); 
> > > > > > > > > ?>">Mouscron</a><br />
>
> > > > > > > > > <a href="<?php echo $html->url('/pages/magasin/Leers-Nord'); 
> > > > > > > > > ?>">Leers-
> > > > > > > > > Nord</a>
>
> > > > > > > > > And the resultant HTML code is:
>
> > > > > > > > > <a href="/home/maryphot/www/maryphoto/pages/magasin/
> > > > > > > > > Mouscron">Mouscron</a><br />
> > > > > > > > > <a 
> > > > > > > > > href="/home/maryphot/www/maryphoto/pages/magasin/Leers-Nord">Leers-
> > > > > > > > > Nord</a>
>
> > > > > > > > > The part "/home/maryphot/www/maryphoto" is overdue, and I 
> > > > > > > > > don't know
> > > > > > > > > how to remove it, I checked /cake/libs/view/helpers/html.php 
> > > > > > > > > and I
> > > > > > > > > found that the url() function was a member of the Router 
> > > > > > > > > class, then I
> > > > > > > > > saw at it but don't know how to fix that problem ... Can 
> > > > > > > > > someone help
> > > > > > > > > me ?
>
> > > > > > > > > Sorry for my bad english ... :(


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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