nbhatti2001
nbhatti2001

Reputation: 363

accessing subfolder of cakephp site

I have develop a site using cakephp and upload to www.example.com. Now I want to have some html pages in subfolder like www.example.com/subsite.

Please help how I can do this as cakephp take subsite as controller name and redirect it to main site. how I can display the html pages under subsite.

Upvotes: 0

Views: 902

Answers (3)

Chris Pierce
Chris Pierce

Reputation: 736

this can be done by placing the html pages in the app/webroot folder

http://www.example.com/subsite

would be

app/webroot/subsite/index.html

as an example. If you are talking about actual pages in your cakephp then you could do that by creating a controller.

Upvotes: 2

Derek
Derek

Reputation: 4751

Set it up as a plugin by putting it in your /app/plugins folder, ie: /app/plugins/subsite. You can then access it at www.example.com/subsite

Upvotes: 0

Oberst
Oberst

Reputation: 477

I suggest reading up on how your routes.php file works.

http://book.cakephp.org/2.0/en/development/routing.html

Also, I saw a tutorial somewhere, where someone edited their error files to act as a makeshift router. The tutorial was quite old, but the idea is still there.
Basically, when the error page would normally show page not found, it would check a folder to see if the requested controller was actually a file. If found, display that file, otherwise, give the standard page not found error.
You could try something of the similar.

Upvotes: 0

Related Questions