CakePHP: Set up a new project within another project - cakephp

I've copied a homepage to the server, after a few problems with 1&1, if this matters, I've changed the .htaccess in the root, /app and /app/webroot directories. After
RewriteEngine on
I've included
RewriteBase /
to get it to work. However, beside the homepage itself, I've made an administration by adding a new CakePHP-project in the folder "Administration" which I've simply copied in the root-directory. Worked perfectly with XAMPP, but unfortunatly not with the 1&1-server. I've also tried to copy it in the app-folder, but visiting example.com/Administration will just give me an error, that says, the controller cannot be found.
Any ideas how I could access my administration?

Related

Cakephp subdomain in subdirectory not loading static files

I have CakePHP in a subfolder public_html/cakedir, the folder being accessed from http://cakedir.mydomain.com. Everything seems to be working so far except that the static files are not being found, giving me 404 on the css files.
I'm unable to find anything useful on this issue, though it seems like something straightforward, so perhaps I'm just searching the wrong terms.
Thanks
This was a problem with the .htaccess file in webroot. Add RewriteBase /cakedir/app/webroot/ after RewriteEngine On and it'll work!

CakePHP and NearlyFreeSpeech.net

How do I set AllowOverride on NearlyFreeSpeech.net? I'm trying to follow the instructions at Within cakePHP, In my routes.php only the '/' (base path) works. Any other url is 404 page not found to resolve the problems described therein.
So far, I've had to do the following when moving out of a WAMP development environment:
Refer to controller names by their correct case
Change the name of the server in the configuration file
Add all the CakePHP-related files to the web group
The solution is as follows:
Copy the files over from your working environment (or do an export from your source control tool) into a new folder on NearlyFreeSpeech.net (NFS.net). Let's call the new folder "abc".
Import your database into NFS.net.
Configure database settings as necessary on the NFS.net version of the site.
Add the abc folder and everything in it to the web group.
Go into the .htaccess file in /home/public/abc and add "RewriteBase /abc" under "RewriteEngine on".
Add "RewriteBase /abc/app" to the .htaccess in /home/public/abc/app and add "RewriteBase /abc/app/webroot" to the one in /home/public/abc/app/webroot.

CodeIgniter - Project is main website

This may be a potentially really, really dumb question.
So my CI project is going to be our main company website. I have created it here:
www.example.com/CodeIgniter_2.1.3
How do I get my users redirected to that when they just visit www.example.com/ and have it stay www.example.com in the URL?
Is this a .htaccess file thing? Or do I need to move my folders up a level?
CodeIgniter's default behavior is to hide it's actual path. You should only need to copy the .htaccess to the document root, and modify the path to include CodeIgniter_2.1.3
i.e:
RewriteRule ^(.*)$ /CodeIgniter_2.1.3/index.php?/$1 [L,QSA]
So you have put the CI files in a directory called Codeigniter?

URL rewriting is not properly configured on your server

I tried upgrading my cakephp version from 1.3 to 2.5 but encountered an url rewriting problem. Another cakephp app runs on the same version so I'm sure the mod_rewrite works.
Although when I go to example.com/pages/home I get following error:
URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting
When I go to my normal home page and I want to click on a home link I get following url :
http://example.com/app/webroot/index.php/
And it is the same for other urls.
http://example.com/antwerp becomes http://example.com/app/webroot/index.php/antwerp
When I go to http://example.com/antwerp the site works as it should...
Any ideas where I've gone wrong?
I would suggest accessing your account and re-uploading your .htaccess files from and to the following locations respectivelly.
/app
.htaccess
/webroot
.htaccess
.htaccess
Some FTPs do not upload those files automatically until you force it to.
If that does not work, check if you have your php.ini file in your public_html folder of this application.

Changing default install url path Bitnami Drupal 7 VM

In the bitnami default install of drupal 7 I want to change http://example.com/drupal to http://example.com/content
First attempt: modify $base_url in settings.php (/opt/bitnami/apps/drupal/htdocs/sites/default/)
This seemed to break the content at /drupal but did not change the location.
Second attempt: try editing the .htaccess file for everything (/opt/bitnami/apps/drupal/htdocs/). I added RewriteBase /content. Not sure but this didn't seem to change anything.
Third Attempt: try editing the .htaccess for the site (/opt/bitnami/apps/drupal/htdocs/sites/default/files) as described in this post:
How to remove /drupal from URL in Drupal 7 when installation is in the associated sub-directory
But I'm not even sure if I changed the example to the right thing. Deep down I don't believe that this many config lines are needed to change this.
I'm on bitnami-drupal-7.12-2-ubuntu-10.10.
You need to update the alias in the included apache conf file at /opt/bitnami/apps/drupal/conf/drupal.conf
If you look at the file, you'll notice that the alias is set to /drupal
Change this to /content

Resources