How to enable .htaccess in httpd.conf on XP?
I would like to use mod_rewrite() on my apache setup on a windows machine. As you probably know, Windows doesn't use Unix-style hidden filenames like ".htaccess."
So should I change AccessFileName .htaccess
to AccessFileName xyz.htaccess
?
or there i开发者_高级运维s something else I need to do?
It's only Windows Explorer that won't let you create dot-filenames. Create the file with any name you like, then use a Command Prompt to rename it:
ren pog.htaccess .htaccess
You can then edit it using Notepad or whatever to your heart's content, and you'll still be using the same filename as everyone else.
Windows Explorer will happily let you move the file around and so on even with a dot-filename - it's just naming or renaming such files that fails.
Open up your httpd.conf. Change this line in to the following:
AccessFileName ht.acl .htaccess
Apache on Windows should use it, it just won't be hidden.
精彩评论