惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
GbyAI
GbyAI
博客园_首页
V
Visual Studio Blog
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
腾讯CDC
博客园 - Franky
IT之家
IT之家
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
B
Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - 大步前行

destoon的如何显示tag生成的sql语句 今天看到一个关于黄帝内经的消息,祝华英的消息 laravel 代码维护, 使用php artisan使用应用程序处于维护状态 csdn能不靠点谱啊 Laravel4.2取得配置文件值 dwz 取不到 form中的值 无法开始服务器! 服务器执行缺少? thinkphp __PUBLIC__的定义 __ROOT__等常量的定义 树形列表 jqtree数据 使用 图片下载器下载网页内容及网页图片,节省时间 好久不做开发了,最近使用vs2008遇到了不能添加多个项目的问题,在此标记一下 看到蘑菇街的注册界面不错,截了个图,发这在里,做个标记 蓝色标题栏div css 如何使用ActionScript来检测用户的语言及屏幕分辨率 如何使用ActionScript来检测用户的操作系统种类及浏览器类型 如何使Flex Builder 3与flash cs4共同工作 在flash中使用arguments数组 flash 的计数器 flash的运算比较符
htaccess不起作用的解决方法,AllowOverride All打开后出现403...
大步前行 · 2012-11-27 · via 博客园 - 大步前行

在php程序的目录下有一个htaccess文件,这个文件起着对url重写的作用,但是不巧的,在我的应用程序里不起作用,baidu了一下,发现是

AllowOverride All,  这个选项没有打开,

这个选项,只能写在

<Directory />

</Directory>中,我在http.conf中打开了这个选项,结果网站出现了403禁止访问的错误,经查看,结果发现是

<Directory />

Options Indexes

AllowOverride None

#AllowOverride All

Order allow,deny

Allow from all

</Directory>

不应在/这个目录下,写这个选项,应在应用程序的目录下打开这个选项,

<Directory "http://www.cnblogs.com/WebRoot/Default"> 这里的相对目录是对于配置文件中的ServerRoot而言.

#

# Possible values for the Options directive are "None", "All",

# or any combination of:

#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

# The Options directive is both complicated and important.  Please see

# http://httpd.apache.org/docs/2.0/mod/core.html#options

# for more information.

#

    Options Indexes FollowSymLinks

#

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

#   Options FileInfo AuthConfig Limit

#

    AllowOverride All

#

# Controls who can get stuff from this server.

#

    Order allow,deny

    Allow from all

</Directory>

 如果打开了这个选项,还不起作用,那么就得检查一下httpd.conf中打开了rewrite选项了没有

LoadModule rewrite_module modules/mod_rewrite.so