|
|||
|
Whenever I try to post a form from a controller other than to any url other than '/' I get a 403 error (in Fiddler or Firebug) and then the $_POST array is empty. So for example the url I'm trying to post to is '/admin/', but the $_POST array is always empty unless I post the form to '/' or to an actual filename. I can't imagine that I'm the only person who's ever run into this issue. Please help!!!
Here's my .htaccess file: RewriteEngine On RewriteBase / Options +FollowSymLinks RewriteCond %{REQUEST_FILENAME}% !-f RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php |
|
|||
|
I'm having the same problem here. .htaccess:
Code:
RewriteEngine on RewriteBase / RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php Code:
class AccountController extends Zend_Controller_Action {
public function indexAction() {
$this->view->title = "User profile";
}
...<more actions here>...
}
Since /index/<action> is working, this seems to indicate that the rewrite is working, right? What else could be going on? It's driving me nuts. |
|
|||
|
Never mind, fixed it. Problem with my apache configuration, turns out rewrite wasn't working at all. If anyone stumbles across this later and needs a tip in setting up Apache, this ubuntu thread helped me out:
mod_rewrite - Ubuntu Forums In my case, I had mod_rewrite turned off, but even after turning it on it wasn't working. I finally figured out that it was because I was running my ZF app in a subdirectory. So I had to edit my .htaccess so that the RewriteBase pointed to that directory, like so: Code:
RewriteEngine on RewriteBase /myapplication RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php Last edited by cjh79 : 06-05-2008 at 02:13 AM. |
|
|||
|
I am using WAMP5. My modRewrite is enabled. I have verified by placing .htaccess file in different folders.
My url for ZF application is 'http://localhost/personal/dev/ckc/' My Is problems are: 1- If I keep 'RewriteEngine on' enabled in my .htaccess file, it gives me error. While if I comment it, then there is no error. 2- I am still unable to access 'http://localhost/personal/dev/ckc/Person' while 'http://localhost/personal/dev/ckc/' works perfectly. Note: 'Person' is my controller class which is in the same directory as 'Index' controller. Can anyone help me in this regards |
![]() |
| Thread Tools | |
| Display Modes | |
|
|