I hate to say it, but I think the answer is that you no longer need to
un-comment that line:

config/core.php
Configure::write('App.baseUrl', env('SCRIPT_NAME'));

I think the latest version just works out of the box without mod_rewrite.  I
didn't find it documented anywhere, and I would think it should state it
pretty clearly in the documentation very early on, but if you just use

example.com/?url=controller/action/params.../

instead of the pretty url's, it just works.

I guess all is not lost if this is indeed the case, because at least I
walked through the code 100 times and have a better understanding of the
class hierarchy and execution path.  =/

Hope this helps the original poster.

- Rich


Jasp182 wrote:
> 
> I'm having the same issue.  I'm using shared hosting on a Linux server
> with a default installation of cake 1.2 using app/webroot as my root
> directory.  I thought I'd be able to go through the code dropping echo/die
> statements to find out what is driving this (I'm not using an IDE I can
> step through...that would be quite handy right now), but it's become a
> tedious and somewhat frustrating task.
> 
> All of my relative links (js, css, img) on my default layout broke as soon
> as I uncommented that line.  I'm very new to the cake framework, so this
> may be a stupid question, but could it possibly be that using cake without
> mod_rewrite is not properly or fully implemented yet in v 1.2 (how new is
> this version?).  When I was first looking into this issue, everything I
> came across searching this subject dealt with an older version where the
> naming convention was slightly different and only one bug report I found
> on google had the 1.2 naming convention.
> 
> Anyway, I would suspect that there are either some global constants and/or
> a single function in a helper object that is driving the creation of
> relative links.  Hopefully someone more experienced with cake and
> specifically v 1.2 can shed some light on this.
> 
> Many thanks in advance...
> 
> - Rich
> 
> 
> Steve O-2 wrote:
>> 
>> 
>> It's Apache/2.0.52 (CentOS) Server
>> 
>> On Jun 18, 3:15 am, uniacid <[EMAIL PROTECTED]> wrote:
>>> Which webserver are you running it on?
>>>
>>> If it's on IIS you might want to try what I did
>>> here:http://groups.google.com/group/cake-php/browse_thread/thread/016f6649...
>>>
>>> On Jun 18, 12:34 am, Steve <[EMAIL PROTECTED]> wrote:
>>>
>>> > But of course, uncommenting that breaks my other links. Any help?
>>>
>>> > On Jun 17, 11:48 pm, Steve <[EMAIL PROTECTED]> wrote:
>>>
>>> > > The server I am uploading a cake site to doesn't have mod_rewrite
>>> > > enabled. So, as the core.php instructions say, I deleted all of the
>>> > > necessary .htaccess files and uncommented line 55:
>>>
>>> > > Configure::write('App.baseUrl', env('SCRIPT_NAME'));
>>>
>>> > > .. however, this line is breaking my css and js links. I have cake
>>> and
>>> > > the app directories outside the public_html folder.. and the webroot
>>> > > files in public_html. The link it's generating is '/app_name/css/
>>> > > screen.css' .. when it should be generating '/css/screen.css'
>>>
>>> > > When I comment out that configuration line, however.. the links
>>> work.
>>>
>>> > > Technically, I fixed the problem, but I'm just wondering why the
>>> > > instructions say to uncomment that line, since it's what caused me
>>> > > problems
>>>
>>>
>> >> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Broken-CSS-after-uncommenting-App.baseUrl-tp17959235p18007015.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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