I've been recently searching StackOverflow (and the internet as a whole) and have been unable to find a way to create a .htaccess file for Windows 10. I get 104k search results on ways to do it with Windows 10 (many of which I've tried). The end goal for this project is to create a subdomain for each row in a database, so I'm wondering if using the .htaccess file is the way to go. So how do I create an .htaccess file in XAMPP (on Windows 10)? Or do you have a better way to do this?
Asked
Active
Viewed 5,334 times
0
-
You can use a text editor of your choosing. Or is this about something more concrete? Which of the 104k search results came close to what you're trying? – mario Jul 05 '18 at 23:32
-
So, is this purely about [using Notepad](https://stackoverflow.com/questions/5004633/how-to-manually-create-a-file-with-a-dot-prefix-in-windows-for-example-htacce) then? Or how to [rename](https://ss64.com/ps/rename-item.html) the resulting text file? Or how to declare a [different filename name](https://httpd.apache.org/docs/trunk/en/mod/core.html#accessfilename) in Apaches config? – mario Jul 05 '18 at 23:50
1 Answers
0
it is simple as you think, just open your favorite text editor and create a file as .htaccess and put some apache rules inside. It should work!
-
I keep getting a .htaccess.txt. I selected "all files" when saving and I removed the .txt extension but windows is being uncooperative... or is it supposed to be .htaccess.txt? – user123 Jul 05 '18 at 23:41
-
No, .htaccess is tottaly correct, there is no .txt at the end. If you navigate inside your xampp folder, I don't know how it is in windows but usually you have to put your code inside htdocs folder, If Im not wrong there is .htaccess file for example inside this folder. – Pedro Henrique Guimarães Jul 05 '18 at 23:47