Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In regard to my first post mod_rewrite problems in sandbox: Mac OSX 10.6.6 Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3 I am making progress but...

Now the index.php page is not recognized or PHP is not executing. Here is the error message for this page (http://localhost/~nino/mod_rewrite_test/page/somepage):

Not Found
The requested URL /Users/nino/Sites/mod_rewrite_test/index.php was not found on this server.

If I just go to the directory, in my browser, (http://localhost/~nino/mod_rewrite_test/) the php page is downloaded, not executed.

This only happens in this directory that I have a custom conf file for mod_rewrite (/etc/apache2/users/nino.conf):

<Directory "/Users/nino/Sites/mod_rewrite_test">
        Options All -MultiViews
        AllowOverride All 
        Order allow,deny
        Allow from all
</Directory>

Here is my .htaccess file for the mod_rewrite_test directory:

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php

RewriteEngine on
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1   

Mac OSX 10.6.6 Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3

share|improve this question
    
Have you enabled PHP in the Apache configuration file? –  qsheets Nov 1 '12 at 17:10
    
yes-------------------------- –  nino Nov 1 '12 at 23:16
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.