Zend Server localhost and mod rewrite

64 Views Asked by At

I am using zend server and zend studio on my local windows machine php 7 with MySQL community installed.. I have went through several documents in order to set up my projects properly but I have ran into a issue.. I wanted to use the automatic upload and have the ability to enable back to local development. and have successfully done so.. my issue is that I had to deploy to localhost when I am not uploading to server in order to work with local..

mod re write is enabled and working.. but my first issue is that it seems to create 2 directories

The application name is orbit_cms
the application url: http://localhost/orbitcms

now I have a .htaccess in the folder orbitcms with the following.

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

then if I go to http://localhost/orbitcms/index.php it works,

but this will not

http://localhost/orbitcms/index

now if I put in the app folder name

http://localhost/orbit_cms/index it works

now zend writes a config when it deploys and here it is

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>

The other issue is the mod re write.. the production part does not work on localhost but the development one does.. any reason why?

0

There are 0 best solutions below