|
|||
|
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
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
}
Code:
<html> <head><title>test</title></head> <body> <h1>Test!</h1> </body> </html> 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
Regards, Filip |
|
|||
|
check my question which i solved it
i think i was having the same error of page not found in m case the .htacces was not being considered and bypassed just check this i had this in my httpd.conf file of Apache server " AllowOverride None" which was supposed to be AllowOverride All and it solved my problem for complete detail chek my question whcih i solved it need help in setting Zend localhost:8000 works but localhost:8000/index does not :( |
|
|||
|
I don't think it's that. I put a .htaccess file on the server with a permanent redirect to "http://www.google.com" and as soon as I loaded the page I got redirected to that link. So it's not my apache bypassing the .htaccess file. I can't go check if the allowOverride is "all" but the one in charge of the server told me that it should be. I also assume that since it's redirecting through my .htaccess file that it probably is.
I'll keep digging ... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|