本文介绍了Zend服务器社区版的.htaccess问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Zend服务器的新用户。出于某种原因,Apache不读项目文件夹我的htaccess文件。请检查我的设置:

I am a new user of Zend Server. For some reason Apache is not reading my htaccess file in the project folder. please check my settings:

文档根目录:C:\\ Program Files文件\\ Zend的\\ Apache2的\\ htdocs中\\

Document root:C:\Program Files\Zend\Apache2\htdocs\

项目文件夹:C:\\ Program Files文件\\ Zend的\\ Apache2的\\ htdocs中\\ PROJECT1 \\网站\\

project folder: C:\Program Files\Zend\Apache2\htdocs\project1\website\

htaccess的路径:C:\\ Program Files文件\\ Zend的\\ Apache2的\\ htdocs中\\ PROJECT1 \\ website.htaccess

htaccess path: C:\Program Files\Zend\Apache2\htdocs\project1\website.htaccess

例在htaccess的重写规则:

Example to of rewrite rule in htaccess:

RewriteRule ^([a-zA-Z0-9\-]*)-([0-9]*)-([0-9]*)\.php$  /project1/website/index.php?cat=$2&page=$3 [L]

在httpd.conf文件的变化:

changes in httpd.conf file:

的LoadModule rewrite_module模块/ mod_rewrite.so

LoadModule rewrite_module modules/mod_rewrite.so

<Directory "C:\Program Files\Zend\Apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride ALL
    Order allow,deny
    Allow from all
</Directory>

索引页工作正常
HTTP://本地主机/ PROJECT1 /网站/

The index page is working finehttp:// localhost/project1/website/

推荐答案

您应该去httpd.conf文件在你的文件夹apchachi / conf目录并更改设置AllowOverride无人的AllowOverride毕竟重启阿帕奇server.Hope它的工作。

You should go to httpd.conf file in your apchachi folder/conf and change AllowOverride none to AllowOverride ALL after restart apachi server.Hope it work.

这篇关于Zend服务器社区版的.htaccess问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 02:34