Pointer - check the Routes section of the CakePHP book - that should help you on the way to find a solution:
http://book.cakephp.org/2.0/en/getting-started.html#routes
Enjoy, John
On Tuesday, 10 February 2015 03:23:36 UTC+2, alfons...@hotmail.com wrote:
-- http://book.cakephp.org/2.0/en/getting-started.html#routes
Enjoy, John
On Tuesday, 10 February 2015 03:23:36 UTC+2, alfons...@hotmail.com wrote:
Hello,I am starting with CakePHP 2.6 . I created the basic app Posts , and it is working fine when I type in the browser http://www.mysite.com/postsI want to redirect my default site to it: so if I type in the browser http://www.mysite.com it redirects to http://www.mysite.com/posts1.)I have in /etc/apache2/sites-enabled/000-default <VirtualHost *:80>ServerAdmin webmaster@localhostDocumentRoot /var/www/project/app/webroot<Directory />Options FollowSymLinksAllowOverride All</Directory><Directory /var/www/project/app/webroot>Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from all</Directory>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<Directory "/usr/lib/cgi-bin">AllowOverride NoneOptions +ExecCGI -MultiViews +SymLinksIfOwnerMatchOrder allow,denyAllow from all</Directory>ErrorLog ${APACHE_LOG_DIR}/error.log# Possible values include: debug, info, notice, warn, error, crit,# alert, emerg.LogLevel warnCustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>2.) I have in /var/www/project/app/webroot/.htaccess <IfModule mod_rewrite.c>RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php [QSA,L]</IfModule>3.)When I type in the browser http://www.mysite.com , error.log is updated withRequest URL: /Stack Trace:#0 /var/www/project/lib/Cake/View/View.php(961): include() #1 /var/www/project/lib/Cake/View/View.php(923): View->_evaluate('/var/www/ projec...', Array) #2 /var/www/project/lib/Cake/View/View.php(473): View->_render('/var/www/ projec...') #3 /var/www/project/lib/Cake/Controller/Controller.php(959) : View->render('home', NULL) #4 /var/www/project/app/Controller/PagesController. php(68): Controller->render('home') #5 [internal function]: PagesController->display('home') #6 /var/www/project/lib/Cake/Controller/Controller.php(490) : ReflectionMethod->invokeArgs( Object(PagesController), Array) #7 /var/www/project/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction( Object(CakeRequest)) #8 /var/www/project/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object( PagesController), Object(CakeRequest)) #9 /var/www/project/app/webroot/index.php(118): Dispatcher->dispatch(Object( CakeRequest), Object(CakeResponse)) #10 {main}Thanks in advance for your help.
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 unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment