.htaccess文件的正确编写方式
2016-04-07 17:35
239 查看
今天在windows系统编写了一个.htaccess文件, 发现在apache中开放了 modules/mod_rewrite.so以及将AllowOverride None 修改成AllowOverride All. 但访问还是会出现:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
异常. 这让我感到非常不解.异常的苦恼.然后在Google, baidu,.com上搜索各种答案, 然并卵.所有的答案都指向开放mod_rewrite.so和修改 AllowOverride None.
由于我本人非常喜欢用Mac电脑, 但是我本人是做Java的,公司没有给配置Mac电脑, 但是我创建文件的习惯一直都是 Mac系统上的UTF-8格式的文件.才导致我出现的这个错误.我现在就把创建.htaccess文件的步骤以及注意一一道来.
第一步:
开放 modules/mod_rewrite.so
第二步:
将AllowOverride None 修改成 AllowOverride All
第三步:
检查创建的.htaccess文件的格式, 必须一定要与你的系统是一样的. 如果是windows,你的文件就一定要是widnows,如果是Linux就一定要是Linux的.
相关文章推荐
- swift项目真机调试运行启动报错
- ORACLE常用SQL语句
- 无法定位程序输入点WSAPoll于动态链接库WS2-32.DLL
- Fibers in JVM
- 10个随机数和
- 一个小小的vb程序
- 一个小小的vb程序
- 15电气郄慧敏vb作业循环结构计算十个数的和
- DBA索引优化 与 sqlldr使用
- 【BZOJ 2038】【2009 国家集训队】小Z的袜子(hose) 分块+莫队
- iOS iOS与html进行交互
- windows下配置git
- MyEclipse中读取网页时总是多出现一个null
- 魅族电商运维之路
- 【按键PC版本完整注册码系统】可一键可安装
- 【多重背包】HDU2844Coins【模板】
- python学习笔记--socket
- 精简eclipse资源管理器的Customize视图设置
- bzoj 1861: [Zjoi2006]Book 书架
- java 自定义注解