Welcome Guest, Not a member yet? Register   Sign In
How to enable apache2 rewrite module on Ubuntu 12.04 LTS LAMP Server
#1

[eluser]joemalski[/eluser]
Open terminal by pressing CTRL+ALT+T and enter the following commands.
Note: You must have root access.

Code:
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

If you plan on using mod_rewrite in .htaccess files (This is needed if you want to remove index.php in your CodeIgniter urls), you also need to enable the use of .htaccess files by changing AllowOverride None to AllowOverride FileInfo.

By using your favorite editor (I use Sublime Text 2), edit this file:

Code:
sudo sublime-text /etc/apache2/sites-available/default

Find and edit the following:

Code:
<Directory /var/www/>
     Options Indexes FollowSymLinks MultiViews
     # AllowOverride -> changed from 'None' to 'FileInfo'
     # Commented by: yourname
     AllowOverride FileInfo
     Order allow,deny
     allow from all
</Directory>

then restart apache again

Code:
sudo /etc/init.d/apache2 restart



External References:

http://askubuntu.com/questions/48362/how...-in-apache



Quote:Happy Coding with CodeIgniter!




Theme © iAndrew 2016 - Forum software by © MyBB