WampServer设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法分析 原创
本文实例讲述了WampServer设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法。分享给大家供大家参考。具体如下:
出现404 not found 时:
确保LoadModule rewrite_module modules/mod_rewrite.so开启
然后
Options FollowSymLinks
AllowOverride none #此处把none 改成All
Order allow,deny
deny from all
</Directory>
出现:You don't have permission to access / on this server
Options FollowSymLinks
AllowOverride none #此处把none 改成All
Order allow,deny
deny from all #此处把deny改成Allow
</Directory>
确保设置了默认首页:
DirectoryIndex index.html index.htm index.php
</IfModule>
有时候在WampServer上设置Apache伪静态还是会出现
You don't have permission to access / on this server
的提示
这时候进一步修改:
Options FollowSymLinks #此处将FollowSymLinks改为All
AllowOverride All
Order allow,deny
deny from Allow
</Directory>
将Options FollowSymLinks改为:Options All
问题即可解决。
附(伪静态测试代码):
新建php页面index.php:
<?php
if($_GET){
echo $_GET["id"];
}
?>
同级目录下建立文件.htaccess,写入伪静态规则如下:
RewriteRule ^t_(.*).html$ index.php?id=$1
URL地址栏写入:
http://localhost/t_aaa.html
伪静态设置成功则输出:aaa
希望本文所述对大家的Apache服务器设置有所帮助。
- 详解CentOS7安装配置Apache HTTP Server
- apache You don''t have permission to access /test.php on this server解决方法
- Apache2.4.x版wampserver本地php服务器如何让外网访问及启用.htaccess
- Win2003+apache+PHP+SqlServer2008 配置生产环境
- Ubuntu Server 10.04修改Apache的默认目录的方法
- Apache中启用Server Status配置示例
- Moon_LServer Linux下一键搭建Apache+PHP+MySQL+Zend+PHPMyAdmin+GD库的软件
- Apache实现Web Server负载均衡详解(不考虑Session版)
- WampServer下安装多个版本的PHP、mysql、apache图文教程
- Linux下Apache HTTP Server 2.4.26安装教程
相关文章
ubuntu14.04LTS安装nginx+mariaDB+php7+YAF的方法
这篇文章主要介绍了ubuntu14.04LTS安装nginx+mariaDB+php7+YAF的方法,详细讲述了ubuntu14.04LTS环境下nginx+mariaDB+php7+YAF的安装方法与相关注意事项,需要的朋友可以参考下2016-05-05
便宜vps多是哪些技术架构方式(VPS分割架构是怎么超售的)
对于vps服务器租用,一些人们可能比较注重vps服务器价格,那么,了解和清楚哪一类vps服务器比较便宜是有必要的,这样我们就有针对的去选用购买自己需要的便宜vps服务器2015-09-09


最新评论