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
2条回答 默认 最新
- dreamwind1985 2015-05-28 08: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.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 eNSP中防火墙的使用
- ¥15 不能对数据库增删改但是可以查询
- ¥15 在触控设备上启动TabTip.exe打不开键盘界面,怎么用代码启动进程打开界面
- ¥15 lvgl7.11怎么做出文字被选中的效果
- ¥50 如何快速查看手机目标app的主要服务器ip
- ¥15 (标签-stm32|关键词-m3)
- ¥15 matlab中频率调制法代码的解读
- ¥15 ceph的对象、块、文件相关问题求解答
- ¥50 如果使用python进行ERA5 10米风场预报检验
- ¥15 navicat解析mysql密码