Jump to content

Routing issues using Zend


littlevisuals

Recommended Posts

Hi everyone,

 

I was wondering if anyone could be kind enough to help me out with this problem please.

 

Basically im using the zend framework and the project is located in my sites folder. (Mac OS X)  I have apache and set up a virtual server for http://mysite which directs to the project.

 

When I type http://mysite it directs to the public/index/ folder. 

 

I have other pages added, page1.phtml + page2.phtml with the IndexController looking like this

 

<?php

class IndexController extends Zend_Controller_Action {
   public function indexAction()
   {
       
   }

   public function page1Action()
   {

   }

   public function page2Action()
   {
       
   }
}
?>

 

I know everything goes through index.php and the page are accessed by typing http://mysite/index/page1 , but when I type http://mysite/page1 I get a 404 error outside of my app?!

 

If I type some random url after the index e.g http://mysite.com/index/ejkhfjkewhjk  I get an error inside my application ( im using layout.phtml as well )

 

So my host file has been set up with a virtual server pointing to the directory of my app, apache rewrite on in my httpd.conf and a .htaccess file with

 

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3)$ index.php
        

 

What am I doing wrong?  :shrug:

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.