Zend Server localhost和mod重写

时间:2017-01-23 15:51:53

标签: mod-rewrite zend-studio zend-server mod

我在我的本地windows机器php 7上使用zend server和zend studio安装了MySQL社区..我已经浏览了几个文件以便正确设置我的项目但是我遇到了一个问题..我想要使用自动上传,并能够启用本地开发。并且已经成功完成了..我的问题是,当我没有上传到服务器以便使用本地时,我必须部署到localhost。

mod re write已启用且正常工作..但我的第一个问题是它似乎创建了2个目录

  

应用程序名称为orbit_cms
  应用程序网址:http://localhost/orbitcms

现在我在文件夹orbitcms中有一个.htaccess,其中包含以下内容。

RewriteEngine on

#Production
#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]

#Development
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

然后,如果我转到http://localhost/orbitcms/index.php它就可以了,

但这不会

http://localhost/orbitcms/index

现在,如果我输入应用程序文件夹名称

http://localhost/orbit_cms/index它有效

现在zend在部署时写了一个配置,这里是

Alias /orbitcms "C:\Program Files (x86)\Zend\ZendServer\data\apps\http\__default__\0\orbitcms\1.0.0_41/"
<Directory "C:\Program Files (x86)\Zend\ZendServer\data\apps\http\__default__\0\orbitcms\1.0.0_41/">
    AllowOverride All
    Options +Indexes +FollowSymLinks +ExecCGI
    DirectoryIndex index.php
    Require all granted
</Directory>

另一个问题是mod重写.. 生产部分不能在localhost上工作,但是开发人员会这样做..任何原因?

0 个答案:

没有答案