Temp Page

I'm sure you've found yourself building a site for a client and you have a temp page for regular users to see and then another URL for your client to go to until the site is ready for launch. In chatting with Yoeri, we thought of just reconfiguring routes.

$Route->connect('/', array('controller' => 'pages', 'action' => 'underconstruction'));
$Route->connect('/temp', array('controller' => 'pages', 'action' => 'home'));

Just send the user the temp URL for them to view their site. When the site is ready to go, delete the under construction route and rename the home route.

I haven't actually tried this yet so if you have another way, I'd love to hear it.

Published August 15, 2006 · Updated August 15, 2006
Categorized as CakePHP
Short URL: https://snook.ca/s/693

Conversation

1 Comment · RSS feed
Chris Hoeppner said on December 31, 2006

I have placed an index.html file in the webroot folder. Usually index.html is before index.php in the indexFile directive for apache servers, so it's called first.

However, you won't be able to have a "client-viewable" route, unless I've overlooked something.

I hope there's no problem on commenting on an "old" post.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.