Hi,
thanks for your reply. I have tried it out (after editing
the .htaccess file I made a restart for apache), but it is still not
working.
Somehow if I have an image like:
<img src="uploads/news/test.jpg" alt="" />
It won't be displayed by the browser.
The path for the image is: app/webroot/uploads/news/test.jpg
:(
Best,
korcs
On Mar 23, 5:51 pm, <[EMAIL PROTECTED]> wrote:
> Hello korcs if you are using mod_rewrite try this:
>
> 1. Change your webroot/.htacces
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /chocolate_cake
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> </IfModule>
>
> in your webroot/index.php
> define('WEBROOT_DIR', 'chocolate_cake'); // <<<------ add this line at
> beginning
>
> Test with your configuration and let me know
> Ciao
>
> > -----Messaggio originale-----
> > Da: [email protected]
> > [mailto:[EMAIL PROTECTED] Per conto di korcs
> > Inviato: venerdì 23 marzo 2007 16.47
> > A: Cake PHP
> > Oggetto: Re: webroot
>
> > Thanks, it won't work with my site because if I did the way
> > you mentioned, i could not store the whole content of a page
> > in a single database field, without parsing it every time,
> > looking for images and links.
>
> > The solution to replace the code in the database is also a
> > bit problematic, because you have to do it then each time
> > when you move your app to an other server.
>
> > Any other ideas?
>
> > On 23 Mrz., 16:15, "djiize" <[EMAIL PROTECTED]> wrote:
> > > Use the Html helper to include elements in your page, it deals with
> > > the place of Cake files in the webroot
>
> > > instead
> > > <img src="chocolate_cake/img/picture.jpg" /> do
> > > $html->image('picture.jpg');
>
> > > The helper will automatically look into img/ folder. And if
> > your site
> > > is in a webroot's subfolder, it will see it too, and
> > produce correct
> > > HTML code.
> > > Move your app, and it will still work
>
> > > Same thing for CSS, JS, ...
>
> > > On 23 mar, 15:47, "korcs" <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I have a little problem with my webroot.
>
> > > > I have my whole cake dir structure in a dir called
> > 'cholocate_cake'.
>
> > > > I am using a database, where the html code of the pages stored.
> > > > This code contains some links and images as well.
>
> > > > All of these links and images are working with relative
> > adresses (f.e.
> > > > for images: 'src="img/picture.jpg"', where the
> > picture.jpg is in the
> > > > './img/' directory).
>
> > > > Now I found, that when I copy the content of the old img
> > directory
> > > > into the app/webroot/img directory, then the pictures are not
> > > > displayed. Only if I change the links to
> > 'src="chocolate_cake/img/
> > > > picture.jpg"'.
>
> > > > Do you know which is an elegant solution for this?
>
> > > > Best,
>
> > > > korcs
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---