How to change time zone on ubuntu – linux ?

It is very easy to change the timezone on your Ubuntu desktop or server system when using the command line. Debian-based versions of Linux, like Ubuntu, make this task as easy as reconfiguring a package via the package management system. To change the timezone on your Ubuntu system, execute the following in a terminal as root:

dpkg-reconfigure tzdata

The package tzdata should already be installed but in case it isn’t just install it by running the following command as root:

apt-get install tzdata

When reconfiguring tzdata, you will be taken to a screen where you will be required to select your general geographic location from a list as shown in the screenshot below:

from:

http://www.tutorialarena.com/blog/change-timezone-on-ubuntu-using-the-command-line.php

How to enable mod rewrite for linux ubuntu ?

In order to use mod_rewrite you can type the following command in the terminal:

a2enmod rewrite

Restart apache2 after

/etc/init.d/apache2 restart

Then, if you’d like, you can use the following .htaccess file.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

The above .htaccess file (if placed in your DocumentRoot) will redirect all traffic to an index.php file in the DocumentRoot unless the file exists.

So, let’s say you have the following directory structure and httpdocs is the DocumentRoot

httpdocs/
    .htaccess
    index.php
    images/
        hello.png
    js/
        jquery.js
    css/
        style.css
includes/
    app/
        app.php

Any file that exists in httpdocs will be served to the requester using the .htaccess shown above, however, everything else will be redirected to httpdocs/index.php. Your application files in includes/app will not be accessible.

 

Source http://stackoverflow.com/questions/15492446/codeigniter-2-the-requested-url-was-not-found-on-this-server-404-error-ci-is