user2353802
user2353802

Reputation:

is it possible in cakephp to access directory outside of app

I want to access folder outside the app directory for different web application

my folder structure is like

/public_html/app
/public_html/application1
/public_html/application2

Url I want is like mydomain.com for app

mydomain.com/application1 for application1

mydomain.com/application2 for application2

Upvotes: 2

Views: 1139

Answers (2)

AD7six
AD7six

Reputation: 66237

Link in the webroot

One very simply approach to make those applications accessible - is to link them in the webroot:

$ cd /public_html/app/webroot
$ ln -s ../../application1 .
$ ln -s ../../application2 .

Note that the webroot not the app should be the document root, i.e. mydomain.com should map to /public_html/app/webroot in the example in the question.

Upvotes: 0

ToX 82
ToX 82

Reputation: 1074

Try placing this RewriteRule ^(application1|application2)($|/) - [L] before the other cakephp rules, in .htaccess.

Upvotes: 1

Related Questions