0

I have an OS X Snow Leopard Server that I use for development. I noticed that if I access http://site.com/page it serves page.php even though there is no .htaccess file that rewrites the URLs.

I would like to disable this option as it's not really something I want.

Thanks!

Later edit: The solution I noticed to work best is Options -MultiViews in .htaccess. Thanks to all!

Sorin Buturugeanu
  • 1,782
  • 4
  • 19
  • 32
  • 1
    Possibly MultiViews or mod_speling. – mario Feb 13 '12 at 21:16
  • possible duplicate of [hide .php extension - htaccess](http://stackoverflow.com/questions/8371634/hide-php-extension-htaccess) – mario Feb 13 '12 at 21:17
  • 2
    You misunderstand, mario, he wanted to disable the rewriting, not enable it. – red Feb 13 '12 at 21:17
  • @red: I bet he still needs to know *what* to disable to do so. Disabling mod_rewrite is not overly helpful if that wasn't the cause. – mario Feb 13 '12 at 21:53

5 Answers5

1

If you do not need the rewrite mod, you should disable it by removing rewrite.conf from enabled-modules under apache folder.

red
  • 1,980
  • 1
  • 15
  • 26
1

As suggested you'll want to disable the rewrite module. On a Mac you'll do this by commenting out the line LoadModule rewrite_module libexec/apache2/mod_rewrite.so (put a semicolon on the beginning of the line) in the file /etc/apache2/httpd.conf.

Remember that you need root access to change this file, e.g. sudo <favourite text editor> /etc/apache2/httpd.conf

Then restart apache with sudo apachectl restart

Jørgen R
  • 10,568
  • 7
  • 42
  • 59
0

Check your apache conf file and see if there are any rewrite settings there. Also check in any virtual host sections.

John V.
  • 4,652
  • 4
  • 26
  • 26
0

surely in the apache server config files.

For development you can use also mamp for example :

mamp

moxy
  • 1,634
  • 1
  • 11
  • 19
0

User mario answered my question, but since he did so in a comment I cannot accept that answer. I up-voted his comment, but I'm going to post the solution here, so anyone looking for something similar will find it easier:

options -multiviews
Sorin Buturugeanu
  • 1,782
  • 4
  • 19
  • 32