drvc63490 2015-05-28 16:41
浏览 95
已采纳

为什么.htaccess会自动更改为.htaccess.txt

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
Screenshot of Properties window

  • 写回答

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.

    1. Open the file your created in a text editor, just use Notepad.
    2. Choose "Save as.." and select "All types (.)" next to file type.
    3. 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.

    http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions#show-hide-file-name-extensions=windows-7

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?