This is an article that I wrote few months ago in my own blog about enabling .htaccess and URL rewriting in Apache HTTP Server for windows. I decide to move this article here so that those information technology related information will be focused in this site.
Enabling “.htaccess” file in Windows need some tricks. Windows does not support filename started with a dot. What we can do here is to use “htaccess” or whatever name instead of “.htaccess”.
Step 1 – Check Apache is working properly
Make sure you have setup apache and php correctly. Make sure that you can run PHP scripts (or other scripting) without any problem.
Step 2 – Modify httpd.conf
Use notepad to open httpd.conf config file. Make use the line “LoadModule rewrite_module modules/mod_rewrite.so” is un-commented.
Under “
And finally, change the line “AccessFileName .htaccess” to “AccessFileName htaccess“.
Remember to restart Apache Windows Service after you have made the changes.
Step 3 – Test out your htaccess file
Write your URL rewrite settings in “htaccess” file and point your browser to the host name to test if the htaccess and URL rewrite setting is correct.
… and it’s done.
Leave a Reply