Hello,
I've been developing this web application using Zend Framework. I've been testing everything locally (XAMPP) and it all works just fine. If I upload everything to the webhost's server (linux), it loads the default index.phtml file in the IndexController.php.
As soon as I add a controller behind the base url I get a 404 page doesn't exist error.
So as far as I can see it's using the bootstrap to redirect to the correct file. But it can't seem to find the other controllers?
I'm programming on a windows XP pro machine and the server machine is running Linux. The
map structure
Code:
topfolder
|
|---html
|---- index.php (bootstrap file)
|---- .htacces
|---- images
|---- scripts
|---- styles
|
|---library
|---------Zend
|---------other
|
|
|---application
|----------classes
|----------config
|-------db.ini
|----------controllers
|--------AuthController.php
|--------ErrorController.php
|--------IndexController.php
|--------UserController.php
|----------functions
|--------function classes are here
|----------models
|--------db models are here
|---------views
|--------filters
|--------helpers
|--------layouts
|--------scripts
|-------auth
|-------error
|-------index
|-------user
|-----index.phtml
so If i load the main page (
Test Page for the SSL/TLS-aware Apache Installation on Web Site) I go to the index.phtml file (I'm sure of this because there's a simple URL on it). This url leads to user. so the URL is "
http://localhost/user ".
When I click the URL I get a page not found error. I think I named everything correct....
Code:
public class UserController extends ....
public function ini()
{ // some initialised variable here
}
public function indexAction()
{
//nothing here
}
then my index.phtml file in view/scripts/user contains
Code:
<html>
<head><title>test</title></head>
<body>
<h1>Test!</h1>
</body>
</html>
Just so I'd know if it would get there....
Unfortunately I get a page not found error....
Does anybody know what the source of this problem could be? I can only thing it's a configuration error in apache on the server? If it was the .htaccess file that would mean it wouldn't work on my localhost either?
I checked the apache config on the server ( phpinfo() ) and it shows the mod_rewrite loaded.
.htacces file:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ /index.php
I really hope somebody can help me out with this!!
Regards,
Filip