Note that there are some explanatory texts on larger screens.

plurals
  1. POCant resolve url to Index Controller
    text
    copied!<p>I've created a simple Zend Framework 1.12 test app via the zf.bat on my windows machine (xampp, php5.3): "zf create project testapp"</p> <p>After that i've created an new controller called 'FoobarController' next to the 'IndexController'. Now I can switch between these urls:</p> <pre><code>localhost/projects/testapp/public/ localhost/projects/testapp/public/index localhost/projects/testapp/public/foobar </code></pre> <p>Now I have uploaded the whole testapp into the web server directory of my raspberry pi (192.168.1.100, Apache2, PHP5.3, ModRewite On, AllowOverride All).</p> <p>This urls are working fine when I call the raspberry from the windows machine:</p> <pre><code>192.168.1.100/sites/testapp/public 192.168.1.100/sites/testapp/public/foobar </code></pre> <p>This one will display: "<strong>The requested URL /sites/testapp/public/index was not found on this server</strong>" </p> <pre><code>192.168.1.100/sites/testapp/public/index </code></pre> <p>Has someone an idea why the url to the "index" controller wont work properly on my raspberry? (I did nothing more than the explained steps) </p> <p>/etc/apache2/sites-available/default:</p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin webmaster@localhost DocumentRoot "/var/www/html" &lt;Directory /&gt; Options FollowSymLinks AllowOverride None &lt;/Directory&gt; &lt;Directory "/var/www/html"&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;/Directory&gt; ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ &lt;Directory "/usr/lib/cgi-bin"&gt; AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all &lt;/Directory&gt; ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined &lt;/VirtualHost&gt; </code></pre> <p>.htaccess:</p> <pre><code>RewriteEngine On RewriteBase /sites/testapp/public # The following rule tells Apache that if the requested filename # exists, simply serve it. RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] # The following rewrites all other queries to index.php. The # condition ensures that if you are using Apache aliases to do # mass virtual hosting, the base path will be prepended to # allow proper resolution of the index.php file; it will work # in non-aliased environments as well, providing a safe, one-size # fits all solution. RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::$ RewriteRule ^(.*)$ - [E=BASE:%1] RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload