Thursday, February 5, 2009

use PHP without mod_rewrite

In a previous post I talked about how apache just magically found my php files even when I didn't enter /submit.php but only /submit. Apparently, by default in Ubuntu 8.10 with apt-get apache2/php5 install this behavoir is enabled automatically. However, on the Fedora image it appears that this is not enabled. From a comment posted by Artan in the origional post you need to do a little httpd.conf editing. His comment follows:

"I was trying to get my Apache to do the same thing, but it wasn't working. I finally found a way to do that and it's as simple as putting one option in the options directive in your httpd.conf file. This is called MultiViews.
If you look in the .conf file, among others, there will be a section called Directory "/var/www/html" or whatever the path to your directory is.
The Options directive will most likely be there and will have some options set. All I did was add MultiViews to the list of Option directive and it all magically worked.

This is what my Options directive looks like now:
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
(that is all supposed to be in one line)"

Hope that helps!

No comments:

Post a Comment