I try to configure the CakePHP application in a subfolder, but I run it from the root domain, for example, user requests domain.co.ukand they get the website in {DOCUMENT_ROOT}/version-13/app/webroot.
Hosting setup does not allow me to change the document root, so I have the following .htaccess in the root:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ version-13/app/webroot/ [L]
RewriteRule (.*) version-13/app/webroot/$1 [L]
</IfModule>
It is like doing a job. However, Cake discovers the subfolder and adds it to all the URLs that it creates (e.g. $this->Form->create()actions, etc.), so in the end I get the forms sent in domain.co.uk/version-13/signupinstead domain.co.uk/signup.
I know this will probably be something simple, but I hit a brick wall. No matter what I try, I can not get it to work!