I recently uploaded a website on OVH made with the CakePHP Framework.
The fact is that whenever I want to go on a prefixed route, like /admin
, or a plugin route, like /plugin_name
, it's just duplicate the route on the URL.
For example, I'm on /admin/users/add
, I click on the link to go on the index admin ( /admin
), the URL will be /admin/users/add/admin
. For every prefixed route.
I've put all my folders directly on /www.
Here are my different .htaccess files:
On the root:
SetEnv PHP_VER 5
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /app/webroot/ [L]
RewriteRule (.*) /app/webroot/$1 [L]
</IfModule>
Into the app folder:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /webroot/ [L]
RewriteRule (.*) /webroot/$1 [L]
</IfModule>
And into the webroot:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]
</IfModule>
Furthermore, That did the same with my CSS / JS declarations in the <head>
, and I noticed that if I don't use the CakePHP HtmlHelper, it works. But I can't do that for all my links / forms.
Thanks.