Accessing Subdirectory in public_html using CakePhp 2.0 - cakephp-2.0

my question is very simple.
I have a /cms subdirectory on my /public_html directory.
when I try to do: mysite.com/cms cake tries to find cms controller instead of showing the index.php that /cms contains.
How can I make cake to search this folder in the public_html?
Thanks.

Is this a folder that belongs to your app or is it an external one? This problem is most likely because your public_html folder is your cake root folder (or at least you have the .htaccess for routing there)
You may want to have your cake app on a subfolder instead of having it on the root of youe webserver
If the content belongs to yout app, you can put The cms folder on the wwwroot folder of your application or follow this tip and move all from cms to Pages folder

Related

How do I deploy an AngularJs app through github from a subfolder?

I have an AngularJs web app that I've created and would like to deploy through github on a gh-pages branch.
Due to the structure of the project's files and directories the index.html file is not located in the root folder. The file is buried a couple of levels deep.
How can I have github launch the app from the folder where my index.html file is located without changing my file structure?
Here is a link to my github repository: https://github.com/JustCant/CharTracker/tree/gh-pages
You have to set the base href inside your index.html file to <username.github.io/repository-name> or you can use the command below while building the final app to do the same -
ng build --prod --base-href=<username.github.io/repository-name>

Cakephp installation on WAMP missing files

I am running WAMP and it runs correctly. I installed composer apparently successfully, and also installed Cake with no errors. It created a cquiz project. When I go to the URL in my browser I see all of the text for the default cake page, but none of the css or images. It is looking for files, for example, /cquiz/css/cake.css but when I open the cquiz directory I don't see any folder called css. What did I do wrong?
You need to set your documento root to cquiz/webroot.
If you are using Apache (I assume this because you said you are using WAMP) you have to edit the httpd.conf file and change the document root to your webroot directory.
Otherwise if you cannot or don't want to change the document root (let's say for example if you have another web app in the same server) you can move all the files inside webroot to your root directory and edit the index.php (which you moved from webroot to root directory) and change the require webroot to fit the new location.

how to change top-level `www` directory in cordova

I'm currently developing an AngularJS project with Cordova. For my AngularJS project, I'd like to have a directory called src/app at the root of the project that contains index.html and all of my application modules. However, Cordova expects a www directory instead. How can I tell Cordova to look in src/app?
The answer was to simply build everything to www, which is the directory that cordova expects, which means all processed js/css goes there, and you have to copy any images, fonts, html, etc. as well as part of your build/watch processes.

How do I deploy my GAE project for only a specific folder?

I wonder how do I deploy my Google App Engine project only for a specific folder?
e.g. If my project source folder is "src", and inside this src folder have many sub folders. Say, I have css, app, images, and js folders, but I want to deploy only css, app and images folders to the GAE, I want GAE to ignore js folder during the deployment, is there any way to do so with some setting in app.yaml file?
Thanks!
Joel
Have a look at skip_files
Skipping Files
Files in your application directory whose paths match a static_dir path or a static_files upload path are considered to be static files. All other files in the application directory are considered to be application program and data files.
The skip_files element specifies which files in the application
directory are not to be uploaded to App Engine. The value is either a
regular expression, or a list of regular expressions. Any filename
that matches any of the regular expression is omitted from the list of
files to upload when the application is uploaded.
You can now add a .gcloudignore file to the root of your project (https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore). The syntax is the same as .gitignore files.
For the OPs case, placing the following in the root folder (next to app.yaml) should do the trick:
# .gcloudignore
src/js/

where .jsp files put in web project

I have an issue where to put view (.jsp) file in the web applications.little bit confuse it may be inside the WEB-INF folder or out side the WEB-INF folder.
Lot of spring projects view(.jsp) files are stored inside the WEB-INF folder by creating sub folders.
I saw lot of sample spring projects it includes .jsp files inside the WEB-INF folder.
So What is the best practice for my question
Amila
If your application is servlet centric then you may add .jsp file under WEB-INF and request them via RequestDispatcher. If it is not then put .jsp outside the WEB-INF.

Resources