I am trying to use mod_rewrite and appache to convert my dynamic URLs in to static ones. Therefore I created a .htaccess file in my root folder that is c:xampp/htdocs/unnamed. However whenever i try to rename my text document to .htaccess
it automatically changes to .htaccess.txt
. It appears only .htaccess
in the folder but when i look in the details in the properties menue it is actually .htaccess.txt
. Does anyone know how do i change it to just .htaccess

为什么.htaccess会自动更改为.htaccess.txt
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- dreamwind1985 2015-05-28 16:46关注
That is because on windows it thinks .htaccess is the name of the file. It considers it to be text. Linux it works differently. It doesn't depend on extensions in Linux.
In order for it to work you just rename the file and remove .txt from it. Then it should work how you like it.
- Open the file your created in a text editor, just use Notepad.
- Choose "Save as.." and select "All types (.)" next to file type.
- Then type .htaccess and click on save.
FYI: I would also turn on showing file extensions if you don't already have that on so you can see what extensions your files have by looking at them in the folder.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报