Reputation: 109
I have downloaded a php web application from the web (OntoWiki). After the installation I've tried it and it works fine on my Ubuntu 10.10, but when I try to install it on CentOS Linux, the only page that works is the home page (index.php). If i try to change the page, the browser sends me a 404 error page (page not found). Instead if i try to change the URL with the "index.php" as prefix it works fine. Example:
localhost/app/index.php/directory
-> workslocalhost/app/directory
-> doesn't work (404 error)Why does this happen? On the PC where the program works i have the URL like: host/application
but everything works fine.
Is there an Apache Configuration problem?
Thanks in advance
Upvotes: 1
Views: 683
Reputation: 35360
In an application like OntoWiki, all requests are directed through index.php
. An .htaccess
file accompanies the project including RewriteRule
's to map a path like /directory
to /index.php/directory
.
Apache's mod_rewrite
module must be installed and enabled for the host in order for the RewriteRules to be applied. It sounds like you have it disabled on your CentOS box and enabled locally.
Upvotes: 2
Reputation: 7024
Active the Apache rewrite module:
a2enmod rewrite
Restart Apache.
Upvotes: 2