Hello everyone, this is my first post: D
I'm new to Zend framework and I'm using Zend 2 + PHP 5.5 + MySql + Apache
I have the system on my server running through link and I am not using Apache Virtual Host, I am only using rewrite mode and .htaccess file
The problem:
- I want to put another NEW system on the same server where it could be accessed through localhost / system1 and localhost / system2 but every change I try even opens the system, but when I try to access the menus it always tries to use localhost and not localhost / system1.
It's like Zend has some place where I can set the root directory of the project.
And even if I do not use the menus and directly type the url it tb does not work. I'm using Zend Navigation for menus.
NOTE: I would not like to use Virtual Host, because when I host the system in a host, they usually do not let you tweak the Apache settings.
The following is the .htaccess I'm putting into localhost / system1:
# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?localhost$
# Only apply to URLs that aren't already under folder.
RewriteCond %{REQUEST_URI} !^/public/
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ public/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?localhost$
RewriteRule ^(/)?$ public/index.php [L]
- I would like to make it possible for both systems to use the same Zend, so that the Zend directory does not need to be redundant on ALL new systems. But that's not so important right now. I have an urgent need to resolve the previous item.
Thank you guys and remember that I'm a beginner on Zend so give me a little chewed explanation. (but in PHP I move to many years)