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,如需转载请自行联系原作者
目录
相关文章
|
6月前
|
安全 Windows
“由于启动计算机时出现了页面文件配置问题,Windows在你的计算机上创建了一个临时页面文件。。。”的问题解决
本文主要介绍了因清理电脑垃圾文件时误删虚拟内存导致的Windows页面文件配置问题,并提供了详细的解决步骤。问题表现为开机后出现临时页面文件创建的提示弹窗。解决方法包括通过控制面板或快捷键进入高级系统设置,进而调整虚拟内存设置:进入性能选项中的虚拟内存栏,选择自动管理所有驱动器的分页文件大小,最后确认并重启计算机以恢复正常运行。
4005 5
“由于启动计算机时出现了页面文件配置问题,Windows在你的计算机上创建了一个临时页面文件。。。”的问题解决
|
存储 UED Windows
Windows服务器上大量文件迁移方案
Windows服务器上大量文件迁移方案
869 1
|
iOS开发 MacOS Windows
Mac air使用Boot Camp安装win10 ,拷贝 Windows 文件时出错
Mac air使用Boot Camp安装win10 ,拷贝 Windows 文件时出错
|
12月前
|
存储 开发框架 .NET
Windows IIS中asp的global.asa全局配置文件使用说明
Windows IIS中asp的global.asa全局配置文件使用说明
225 1
|
12月前
|
Java Windows
如何在windows上运行jar包/JAR文件 如何在cmd上运行 jar包 保姆级教程 超详细
本文提供了一个详细的教程,解释了如何在Windows操作系统的命令提示符(cmd)中运行JAR文件。
5545 1
|
缓存 NoSQL Linux
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
268 1
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
|
Java Windows 容器
【应用服务 App Service】快速获取DUMP文件(App Service for Windows(.NET/.NET Core))
【应用服务 App Service】快速获取DUMP文件(App Service for Windows(.NET/.NET Core))
206 4
|
12月前
|
程序员 Windows
程序员必备文件搜索工具 Everything 带安装包!!! 比windows自带的文件搜索快几百倍!!! 超级好用的文件搜索工具,仅几兆,不占内存,打开即用
文章推荐了程序员必备的文件搜索工具Everything,并提供了安装包下载链接,强调其比Windows自带搜索快且占用内存少。
283 0
|
Windows
Windows——如何在文件资源管理器地址栏快速打开Vscode
Windows——如何在文件资源管理器地址栏快速打开Vscode
272 4
|
Windows
Windows——windows10下如何和子系统Ubuntu18.04互传文件
Windows——windows10下如何和子系统Ubuntu18.04互传文件
154 1

热门文章

最新文章

推荐镜像

更多