Changing default install url path Bitnami Drupal 7 VM - drupal-7

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

Related

Debug CakePhp Step by step

My client want the code I've did in a subfolder.
I've put everything inside but I have only a blank page.
When I try to use phpinfo in the index file, nothing appears.
On the app/core.php the same
I don't have access to root to test if it's an issue with the root .htaccess or with my script.
Which cakephp file should be called first if the subdomain setup is good?
Thanks.
EDIT:
Ok I know what's wrong. SetEnv PHP_VER 5_3 does not work on the shared
hosting where my client have his main website. The client does not
want to upgrade the php version and this directive in the .htaccess
seems to be ignored. What alternatives do I have ...?

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.

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.

Cakephp css not working

My cakephp is not loading any css,js. i uncommented the line Configure::write('App.baseUrl',env('SCRIPT_NAME')); in core.php.
and now get all the css and js but I get missing controllers. I have to
put index.php in the url.
eg:-http://localhost/myapp/index.php/login
i enabled the mod_rewrite but still its not working
If you are NOT using mod_rewrite, then you must:
A. Uncomment Configure::write('App.baseUrl', env('SCRIPT_NAME')); (which you said you've done)
B. Remove or disable your 3 .htaccess files (you haven't mentioned doing this...)
/.htaccess
/app/.htaccess
/app/webroot/.htaccess
Don't delete the files, just rename them to eg. .htaccessXXX so you can easily re-enable them later.
Also remember .htaccess are hidden files - so Google "how to show hidden files" if you can't already see them in your file browser.
C. You must include index.php in all your URLs. Eg. http://www.example.com/index.php/my_controller/my_action
Did you remember to do step 2 - disable your .htaccess files?
And remember that if you want to re-enable mod_rewrite again, then you must undo ALL the above three things, ie, comment out Configure::write('App.baseUrl', env('SCRIPT_NAME'));, enable all 3 .htaccess files, and no longer include /index.php in your URLs.
But the biggest question here is, are you really using Cakephp 1.2? This question has been tagged CakePHP 1.2 - but Version 2.1 is out now, so you should probably be using that.

CakePHP: Set up a new project within another project

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?

Resources