On Sun, Feb 24, 2008 at 12:31 AM, Cefleet <[EMAIL PROTECTED]> wrote:
>
> Ok I tried to follow this example.
>
> http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
> to get rid of the pages name
> but my problem is I didn't know where to put this.
>$Route->connect('/*', array('controller' => 'pages', 'action' =>
> 'display'));
> so i just tried to go straight to the route.php file and do this as my
> last thing in the file:
> Router::connect('/*', array('controller' => 'pages', 'action' =>
> 'display'));
> but when I do that i get an empty page, I mean completely empty.
> so has anybody else had this issue?
If you're seeing a completely blank page I'd suggest having a look at
Apache's (not Cake's, though it couldn't hurt) error log.
> I have a hunch it may have something to do with my .htaccess file but
> I have not been a server admin long so I don't fully understand
> modrewrite too well.
>
> This is my web root .htacces file.
>
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>
>
> I tried to change the last RewriteRule to say
> ^(.*)$ PATH_TO_MY_APP/index.php?url=$1 [QSA,L]
> and
> ^(.*)$ PATH_TO_MY_WEB_ROOT/index.php?url=$1 [QSA,L]
>
> and still nothing.
>
> //this is my app htaccess
>
> RewriteEngine on
> RewriteRule^$webroot/[L]
> RewriteRule(.*) webroot/$1[L]
>
>
Before you take this any further, replace all of that with a clean
install (at least, those files) or you could be going in circles for a
long time.
>
> //this is all that is not commented out in router.php
> Router::connect('/', array('controller' => 'pages', 'action' =>
> 'display', 'home'));
> Router::connect('/*', array('controller' => 'pages', 'action' =>
> 'display'));
I'm not sure how to help with that. For my site, I've decided to just
explicitly set out all of the routes that I want the Pages controller
to handle. Well, sort of explicitly. This works, for example:
Router::connect('/about', array('controller' => 'pages', 'action' =>
'display', 'about/index'));
Router::connect('/about/*', array('controller' => 'pages', 'action' =>
'display', 'about'));
The second route handles requests for anything in or below the 'about'
directory (which goes another level deeper). So I have all of those
views stored in the app/webroot/views/pages/about directory.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---