The Coded One

programming, algorithms, discrete math, open-source

Enable mod rewrite in Apache2

with 6 comments

  1. tell apache to enable the module
    sudo a2enmod rewrite
  2. edit apache’s configuration file and change allow override from None to All
    sudo vim /etc/apache2/sites-available/default
  3. restart apache
    sudo /etc/init.d/apache2 restart
  4. test by creating an .htaccess file containing the following code
    Options +FollowSymLinks
    Redirect /test.html http://www.ubuntu/com
  5. You should be redirected to the Ubuntu site instead of getting a 404 error.
Advertisement

Written by Mark Basmayor

March 14, 2009 at 6:43 am

Posted in apache, Linux, Ubuntu

Tagged with , ,

6 Responses

Subscribe to comments with RSS.

  1. Hi,

    Thanks for your tip. I successfully enabled the clean urls in my drupal installation on localhost (running on Ubuntu 9.04)

    Thanks. :)

    meraDrupaDev

    April 26, 2009 at 10:47 pm

  2. But after changing on terminal override to all how can i save it and may be its a silly question but i am a newcomer in ubuntu.

    max

    July 24, 2009 at 9:08 pm

  3. Thank you , I do it and work fine

    Regards

    ahmed

    October 26, 2009 at 1:49 am

  4. Wow loved reading your post. I added your rss to my reader.

    LasePaiva

    November 27, 2009 at 7:02 am

  5. nice tutorial, i posted it to my blog..

    thanks.. ;-)

    nandrito

    December 2, 2009 at 7:44 am

  6. Wonderful, short and pointed.

    Thanks a lot.

    Sameer Pal Singh

    December 28, 2009 at 6:17 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.