FG

How do I rename a file to .htaccess in Windows 7?

Fresh3 days ago
Mar 15, 202689686 views
Confidence Score1%
1%

Problem

I'm using XAMPP to test a PHP script. Now, in the root of the folder I want to place a file according to the requirements of the script. But Windows won't let me rename it to . Is there any way to go around it? I'm using Windows 7 RTM.

Error Output

.htaccess

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I rename a file to .htaccess in Windows 7?

Low Risk

Thanks to https://serverfault.com/questions/22626/rename-files-to-empty-filename-in-windows-vista I learned a new trick. Since this page shows up in Google higher for that error message, I thought I'd link it here too. Essentially if you want to do it in Explorer, name it with a trailing dot. The trailing dot tells Windows what the extension should be, and the initial dot and letters tell it what the filename (without extension) should be. It appears that a file without an extension is permissi…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment