CakePHP的&安培;基于Windows的Apache服务器上的httpd.conf问题(WAMP)

编程入门 行业动态 更新时间:2024-10-26 20:33:24
本文介绍了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指向正确的道路......看到here

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

更多推荐

CakePHP的&安培;基于Windows的Apache服务器上的httpd.conf问题(WAMP)

本文发布于:2023-07-16 04:01:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1117640.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安培   器上   Windows   CakePHP   Apache

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!