um, yeah, you could do it that way too! ;-) 

sometimes you can get so wrapped up in cake's snuggly wool that you forget 
about the real world.

one observation about configuring the pages controller to serve this kind 
of content is that by passing through the cake stack the response can take 
advantage of cake capabilities. so, in case you have some templating or 
logging to do, etc...


On Friday, November 9, 2012 1:50:03 PM UTC-5, cricket wrote:
>
> None of that is necessary. Static, non-Cake files  can be placed in 
> app/webroot. This is what the mod_rewrite lines in .htaccess are for: 
> if the file doesn't exist, pass the args to app/webroot/index. 
> Otherwise, just serve the file as normal. 
>
> On Fri, Nov 9, 2012 at 10:20 AM, sophistry <[email protected] <javascript:>> 
> wrote: 
> > You need to teach CakePHP how. 
> > add this to your routes.php file: 
> > Router::connect('/pinterest_verify.html', array('controller' => 'pages', 
> > 'action' => 'display', 'pinterest_verify')); 
> > 
> > then go to your site: 
> > http://yoursite.com/pinterest_verify.html 
> > 
> > you'll see an error that says "The view for PagesController::display() 
> was 
> > not found." 
> > so, now go create the view by pasting the contents of the HTML file from 
> > pinterest. 
> > 
> > go back to the site, you should see the content of the pinterest verify, 
> but 
> > it will be wrapped in the default layout. 
> > 
> > then, (assuming you are not using the pages controller for anything 
> else), 
> > just hack in this line in the display method to tell it not to use any 
> > layout: 
> > public function display() { 
> > $this->layout=false; 
> > 
> > HTH 
> > 
> > 
> > 
> > On Wednesday, November 7, 2012 11:34:31 PM UTC-5, Justus Kersey wrote: 
> > To verify my website on pinterest, I need to place an html file in my 
> root. 
> > 
> > This is the message I keep getting: 
> > 
> > Your server responded with a status code of 404 (file not found). We 
> tried 
> > to visit the file at http://wallshops.com/pinterest-####.html. 
> > 
> > Where should I place the file, and what do I need to do so that file can 
> be 
> > seen by pinterest??? 
> > 
> > -- 
> > Like Us on FaceBook https://www.facebook.com/CakePHP 
> > Find us on Twitter http://twitter.com/CakePHP 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "CakePHP" group. 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > Visit this group at http://groups.google.com/group/cake-php?hl=en. 
> > 
> > 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to