Hi,
I have installed cake 1.1.5.3148 on a linux server with php 5.1.2. I do
not know the apache version or configuration on the server however.
I installed cake in the top level of my folder structure for my website
as follows :
/app
cake
vendors
index.php
I did not make any changes to the directories as defined in any of the
config files.
Based on this excerpt from the cake manual :
"... If the Cake welcome page looks a little funny (no images or css
styles), it probably means mod_rewrite isn't functioning on your system
...".
I presumed that indeed mod_rewrite was not enabled and/or not running
on the server. I therefore proceeded to modify the app/config/index.php
file and uncommented the line :
define ('BASE_URL', env('SCRIPT_NAME'));
That fixed the welcome page so it looked as expected. I set up the
mysql connection and the welcome page informed me that it could find
the connection and connected to the database fine.
I proceeded to follow the "blog" tutorial (adding the table to the db,
adding a "Post" model, a "PostsController" controller - with an index
function - and finally adding a view). However I found some issues when
attempting to view the new posts page :
1. If I navigate to www.mysite.com/index.php I see the welome page as
expected.
2. If I navigate to www.mysite.com/posts/index I get a page not found
(this was expected after reading in this group about when you do not
use mod_rewrite).
3. If I navigate to www.mysite.com/index.php/posts/index I get a page
not found. This was unexpected as it looks like this in the manual in
the section about when you do not use mod_rewrite.
4. After some headaches I tried www.mysite.com/index.php?posts/index
and got the page that lists the blog posts. It listed 2 posts as
expected.
5. Upon clicking on one of the posts, I noticed that the url it
resolved to was "www.mysite.com/index.php/posts/view/1". Unfortunately,
as you can see from point 3, this does not work in my case
(www.mysite.com/index.php?posts/view/1 does work however).
So, due to point 5, my question is : how do I get cake to not produce
links that look like www.mysite.com/index.php/controller/action and
rather produce them like www.mysite.com/index.php?controller/action ?
Thankyou for any time you can devote to this,
John K.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---