Setting up http redirect

I was trying to setup a http redirect on ubuntu. Spent quite some time.
1) Ubuntu has a
/etc/apache2/sites-available/default
file where you will have to change the AllowOverride option from None to All.
Only this step will enable you to use .htaccess file.
2) In the .htaccess file, I was doing

Redirect 302 ./index.html http://localhost/new.html


Spent more than a hour to figure out, why the redirect is not happening. The problem was, I was doing
./index.html
instead of just
/index.html

No comments: