There are two ways to solve this:
1) Cpanel/Plesk
Create a redirect of all requests with http://www
for http://push...
.
For example. na Bluehost you do it on this page (it’s practically the same operation on all Cpanels).
What are you must select in this case it is your domain, and not let selected "All Domains", otherwise all requests on this server will be redirected to the URL you entered below.
Other than that, down below there are some radio Buttons, which you select if you want to redirect only when the URL has www, in both cases or do not redirect the www.
2) . htaccess
In his .htaccess
root (the first), do the following:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Choose one of the above ways and test.
Any questions, leave a comment below.
How is your file
.htaccess
?– Leonel Sanches da Silva
@I edited the question.
– SunT
Now I need your file
apache\conf\httpd.conf
.– Leonel Sanches da Silva
@Ciganomorrisonmendez I don’t know yet access to
httpd.conf
from the server, but the rewrite mod is working, the cake installation at least said so.– SunT
Have you checked the file
routes.php
? See if it’s like this:Router::connect( '/', array('controller' => 'pages', 'action' => 'home') );
– Igor Martins
@Igormartins Yes and the route is correct.
– SunT