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 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测