Hello,
I'm using the ZF to build an application. I have encountered
a problem that I just don't understand. I can't get hold of the
host url with the setBaseUrl() method from Zend_Controller_Front.
Subsequently, all my links, that are made dynamically
with smarty, don't work, because they turn out like
http://index instead of http://project.dev/index.
But if I for instance do this:
$controller = Zend_Controller_Front::getInstance();
$controller->setBaseUrl('../');
.. all my url's look fine, but I get a 404 error when I click them.
My apache folder structure is like this (it's on windows btw):
/www (webroot for virtual host "localhost")
/www/Tauren/htdocs (webroot for virtual host "tauren.dev")
in /www/Tauren/ I have a httpd.conf file with the virtual host config:
<VirtualHost *:80>
ServerName tauren.dev
ServerAlias tauren.dev
DocumentRoot "D:\wamp\www\Tauren\htdocs"
<Directory "D:\wamp\www\Tauren\htdocs">
AllowOverride All
Options All
</Directory>
php_value include_path
".;d:\wamp\www\Tauren\include\Zend\library;D:\wamp\www\Tauren\include;D:\wamp\bin\php\php5.2.6\PEAR"
php_value magic_quotes_gpc off
php_value register_globals off
SetEnv APP_CONFIG_FILE "settings.ini"
SetEnv APP_CONFIG_SECTION "development"
</VirtualHost>
and in /www/Tauren/htdocs I have a htaccess file with the rewrite rule:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
Hopefully, some of this information might shed light on things. I'll supply
more information on demand. Any feedback and suggestions are welcome at this
point :-)
--
View this message in context:
http://www.nabble.com/Why-isn%27t-this-working--tp21017887p21017887.html
Sent from the Zend Framework mailing list archive at Nabble.com.