Windows下的apache的文件.htaccess

简介:

When I try to setup PHP and Apache in my notebook, I try to enable the .htaccess setting in apache's httpd.conf. After I tried for a few hours (YES, a few hours) at my notebook and google-ing on the internet, finally I found the complete solution.

I record the steps here so that it can help those who want to enable .htaccess and url rewriting in Apache for Windows and also for my own reference in future.

1. Make sure you have setup apache and php correctly. Make sure that you can run php scripts without any problem.

2. Use notepad to open httpd.conf config file. Make use the line "LoadModule rewrite_module modules/mod_rewrite.so" is un-commented.

3. Under "<directory XXX></directory>" section, change the line "AllowOverride None" to "AllowOverride All".

4. Change the line "AccessFileName .htaccess" to "AccessFileName htaccess". This is because in Windows, we can't have a file with filename that starts with a dot.

5. Save the changed file and restart Apache Windows Service. You can then use the file htaccess to process your url rewritting.










本文转自 h2appy  51CTO博客,原文链接:http://blog.51cto.com/h2appy/862831,如需转载请自行联系原作者
目录
相关文章
|
11天前
|
C# Windows
.NET开源免费的Windows快速文件搜索和应用程序启动器
今天大姚给大家分享一款.NET开源(MIT License)、免费、功能强大的Windows快速文件搜索和应用程序启动器:Flow Launcher。
|
1月前
|
Linux Shell Windows
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
|
1月前
|
存储 安全 数据安全/隐私保护
Windows部署WebDAV服务并映射到本地盘符实现公网访问本地存储文件
Windows部署WebDAV服务并映射到本地盘符实现公网访问本地存储文件
252 0
|
3月前
|
Apache PHP
Windows11 安装Apache24全过程
Windows11 安装Apache24全过程
81 0
|
3月前
|
Linux Windows
使用pscp在Windows和Linux之间互传文件
使用pscp在Windows和Linux之间互传文件
|
27天前
|
开发框架 数据安全/隐私保护 开发者
HBuilder开发者必备!Windows上传IPA文件的软件分享
HBuilder开发者必备!Windows上传IPA文件的软件分享
21 1
|
2月前
|
存储 安全 Shell
windows 系统 c 盘 .ssh 文件夹里的 known_hosts 文件的作用
windows 系统 c 盘 .ssh 文件夹里的 known_hosts 文件的作用
65 0
|
2月前
|
安全 Shell 网络安全
windows 系统 c 盘 .ssh 文件夹里的 id_rsa 文件的作用
windows 系统 c 盘 .ssh 文件夹里的 id_rsa 文件的作用
36 0
|
2月前
|
安全 算法 网络安全
windows 系统 c 盘 .ssh 文件夹里的 id_rsa.pub 文件的作用
windows 系统 c 盘 .ssh 文件夹里的 id_rsa.pub 文件的作用
39 0
|
3月前
|
存储 缓存 Java
释放C盘空间:释放Windows休眠文件和关闭虚拟内存
在 Windows 11 专业版中,可以通过以下步骤来释放休眠文件(Hibernate File),以释放磁盘空间。休眠文件是系统休眠(Hibernate)功能所需要的文件,它保存了系统的当前状态,以便在休眠状态下恢复。如果你不使用休眠功能,如果因为C盘空间不足,可以考虑释放这个文件来腾出磁盘空间。
3309 0

热门文章

最新文章

推荐镜像

更多