frakorn
frakorn

Reputation: 109

php web application and strange 404 error (something wrong with Apache ?)

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:

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

Answers (3)

deefour
deefour

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

vinnylinux
vinnylinux

Reputation: 7024

Active the Apache rewrite module:

a2enmod rewrite

Restart Apache.

Upvotes: 2

Petah
Petah

Reputation: 46050

Check you have mod_rewrite enabled on your CentOS server.

Upvotes: 2

Related Questions