XmisterIS
07-13-2011, 03:08 PM
I am using Apache 2.2 on Debian Etch and I'd like to get started with .htaccess
So far, I've got as far as loading the mod_rewrite module into the server, which I achieved by:
a2enmod rewrite
/etc/init.d/apache2 restart
Simple.
Now, I have a test page called "new.html" which is in the directory /var/www/public_html and in order to get things started, I want to rewrite "old.html" as "new.html".
Simple enough, but I can't seem to do it! (old.html just gives me a file-not-found error, which means the rewrite isn't working).
I've looked at three different online tutorials and each one says something different, and none of the methods described work!! (I've tried all three).
Now I am super-confused ... :confused:
Please can someone tell me how to do it, and in order to avoid the complete confusion that I have experienced so far please could you tell me:
a) Where to put the .htaccess file.
b) What needs to go in the file.
Thanks :)
So far, I've got as far as loading the mod_rewrite module into the server, which I achieved by:
a2enmod rewrite
/etc/init.d/apache2 restart
Simple.
Now, I have a test page called "new.html" which is in the directory /var/www/public_html and in order to get things started, I want to rewrite "old.html" as "new.html".
Simple enough, but I can't seem to do it! (old.html just gives me a file-not-found error, which means the rewrite isn't working).
I've looked at three different online tutorials and each one says something different, and none of the methods described work!! (I've tried all three).
Now I am super-confused ... :confused:
Please can someone tell me how to do it, and in order to avoid the complete confusion that I have experienced so far please could you tell me:
a) Where to put the .htaccess file.
b) What needs to go in the file.
Thanks :)