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,如需转载请自行联系原作者
目录
相关文章
|
1月前
|
Web App开发 Windows
【Windows】 chrome 如何下载网站在线预览PDF文件,保存到本地
【Windows】 chrome 如何下载网站在线预览PDF文件,保存到本地
242 0
|
1月前
|
C# Windows
.NET开源免费的Windows快速文件搜索和应用程序启动器
今天大姚给大家分享一款.NET开源(MIT License)、免费、功能强大的Windows快速文件搜索和应用程序启动器:Flow Launcher。
|
15天前
|
安全 Java 测试技术
Windows电脑安装Apache JMeter的详细教程
本文介绍了在Windows上安装Apache JMeter的步骤。首先,需确保安装Java JDK并配置环境变量。然后,从JMeter官网下载ZIP文件,解压至指定目录,并同样配置JMeter的环境变量。验证安装成功后,可通过命令行以GUI或非GUI模式启动JMeter,进行性能测试。
32 0
|
9天前
|
Python Windows
在 Windows 平台下打包 Python 多进程代码为 exe 文件的问题及解决方案
在使用 Python 进行多进程编程时,在 Windows 平台下可能会出现将代码打包为 exe 文件后无法正常运行的问题。这个问题主要是由于在 Windows 下创建新的进程需要复制父进程的内存空间,而 Python 多进程机制需要先完成父进程的初始化阶段后才能启动子进程,所以在这个过程中可能会出现错误。此外,由于没有显式导入 Python 解释器,也会导致 Python 解释器无法正常工作。为了解决这个问题,我们可以使用函数。
15 5
|
1天前
|
easyexcel Java API
Apache POI与easyExcel:Excel文件导入导出的技术深度分析
Apache POI与easyExcel:Excel文件导入导出的技术深度分析
10 0
|
3天前
|
资源调度 Windows
Windows系统yarn : 无法加载文件
Windows系统yarn : 无法加载文件
8 0
|
23天前
|
Apache Windows
windows 一键安装apache服务器 windows傻瓜式安装apache2 web服务器管理软件
windows 一键安装apache服务器 windows傻瓜式安装apache2 web服务器管理软件
32 0
|
23天前
|
Apache Windows
windows源码安装apache2 win安装apache 阿帕奇服务器
windows源码安装apache2 win安装apache 阿帕奇服务器
18 0
|
1月前
|
安全 数据安全/隐私保护 Windows
Windows文件搜索神器Everything安装配置结合内网穿透实现公网查询本地文件
Windows文件搜索神器Everything安装配置结合内网穿透实现公网查询本地文件
|
1月前
|
Apache 项目管理 数据安全/隐私保护
Windows安装TortoiseSVN客户端结合Cpolar实现公网提交文件到本地服务器
Windows安装TortoiseSVN客户端结合Cpolar实现公网提交文件到本地服务器

热门文章

最新文章

推荐镜像

更多