CakePHP的&安培;基于Windows的Apache服务器上的httpd.conf问题(WAMP) [英] cakephp & httpd.conf issues on windows based apache server (wamp)

查看:152
本文介绍了CakePHP的&安培;基于Windows的Apache服务器上的httpd.conf问题(WAMP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我在想,如果有一个人能澄清以下的发生,也许暗示我怎么能解决这个。

抱歉code的怪异色彩

让我解释成立第一。我有WAMP服务器安装和它在物理上位于一个高清然后我发展的文件位于单独的HD。所以我必须添加的别名访问特定文件夹的开发

Let me explain the set up first. I have wamp server installed and it is located physically on one hd and then my development files are located on separate hd. So i have added alias to access specific dev folder

在httpd.conf 我有以下

ServerRoot D:/Program Files/wamp/bin/apache/apache2.2.11  
Listen 80  
ServerName localhost:80  
DocumentRoot D:/Program Files/wamp/www  
<Directory />  
    Options FollowSymLinks  
    AllowOverride None  
    Order deny,allow  
    Deny from all  
</Directory>  
<Directory D:/Program Files/wamp/www/>  
    Options Indexes FollowSymLinks  
    AllowOverride all  
    Order Allow,Deny  
    Allow from all  
</Directory>  

下面是单独的conf文件,包括到httpd.conf中

Alias /project_birthday_planner "E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/"  
<Directory E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/>  
    Options Indexes FollowSymlinks MultiViews  
    AllowOverride All  
    Order allow,deny  
    Allow from all  
</Directory>  

在我的 E:/开发/ ---项目 - 全/项目 - BirthdayPlanner /主干/ 我有我的CakePHP的目录和文件

in my E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/ i have my cakephp directories and files

这里的问题是

我重写模式开启和我的htaccess文件下列文件夹CakePHP的内容如下,

my mode rewrite is turned on and my htaccess files for following cakephp folders are as following,

CakePHP的的

root of the cakephp

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteBase /  
    RewriteRule ^$ /app/webroot/ [L]  
    RewriteRule (.*) /app/webroot/$1 [L]  
</IfModule>  

* \\应用程序*

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteBase /  
    RewriteRule ^$ /webroot/ [L]  
    RewriteRule (.*) /webroot/$1 [L]  
</IfModule>  

* \\程序\\ webroot的*

<IfModule mod_rewrite.c>  
    RewriteEngine On  
    RewriteBase /  
    RewriteCond %{REQUEST_FILENAME} !-d  
    RewriteCond %{REQUEST_FILENAME} !-f  
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]  
</IfModule>  

在我访问的 / project_birthday_planner 我得到以下错误的 404未找​​到

when I access /project_birthday_planner i get following error 404 Not Found

**Not Found**  
The requested URL /app/webroot/ was not found on this server.  

如果我设置的DocumentRoot到我的CakePHP的文件夹或上下移动的作品CakePHP的文件夹和文件初始DocucumentRoot文件夹,所有的火灾。

if i set DocumentRoot to my cakephp folder or move cakephp folders and files to initial DocucumentRoot folder, all fires up and works.

的问题是
我如何解决这个问题,就是这个东西,本身自带的使用Apache的别名
还是我失去了一些片

question is how do i tackle this issue, is this something that inherently comes with the use of apache Alias or am I missing some piece

这应该设立可通过虚拟主机解决呢?

should this set up be tackled via VirtualHost then?

感谢你这么多提前

推荐答案

您必须将的RewriteBase指向正确的道路......看到<一个href=\"http://cookingwithcakephp.blogspot.com/2008/04/installing-cakephp-into-subdirectory.html\">here

You have to point the Rewritebase to the right path ... see here

这篇关于CakePHP的&安培;基于Windows的Apache服务器上的httpd.conf问题(WAMP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆