Pages

Search This Blog

Friday, March 4, 2011

rename htaccess.txt to .htaccess in windows

We will hit error when try to rename htaccess.txt to .htaccess in windows. Error message "You must type a file name."



.htaccess is usually used in php application like joomla and some of the shopping card. The purpose is to provide more user friendly url for SEO purposes or reading purposes by using Apache mod_rewrite.

To overcome this problem, we need to use windows command promp to rename the file. Below is the step by step how we can solve the problem.



  1. Go to windows start and click on Run.


  2. Type cmd in the text box and hit enter


  3. A command prompt will popup, change to the folder location your file htaccess.txt located. In my sample, my file located in C:\temp_folder. So i type

    cd C:\temp_folder

    and hit enter. My current directory will be in "C:\temp_folder"


  4. Use ren command to rename the file.

    type ren .htaccess.txt .htacess

    and hit enter.


    Done.


Hope this help.

No comments: