ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MAMP and .htaccess issues

November 13, 2008 4:22pm

Subscribe [1]
  • #1 / Nov 13, 2008 4:22pm

    jwindhorst

    99 posts

    I know this has been discussed to death, but now my browser is trying to download my front controller, and I’m pulling my hair out.  Here is what I have:

    .htaccess:

    1 AddHandler application/x-httpd-php5 .php
      2 
      3 <IfModule mod_rewrite.c>
      4     RewriteEngine On
      5     RewriteBase /
      6     RewriteCond %{REQUEST_FILENAME} !-f
      7     RewriteCond %{REQUEST_FILENAME} !-d
      8     RewriteRule ^(.*)$ index.php/$1 [L]
      9 </IfModule>
     10 
     11 <IfModule !mod_rewrite.c>
     12     # If we don't have mod_rewrite installed, all 404's
     13     # can be sent to index.php, and everything works as normal.
     14     # Submitted by: ElliotHaughin
     15     
     16     ErrorDocument 404 /index.php
     17 </IfModule>

    config settings:

    $config['base_url'] = "http://localhost/";
    $config['index_page'] = "";
    $config['uri_protocol'] = "AUTO";

    Any help would be greatly appreciated!

  • #2 / Nov 13, 2008 4:49pm

    that AddHandler line looks a bit fishy, try this instead and see how you get on. or just remove it from .htaccess completely, it should already be set in your httpd.conf

    AddType application/x-httpd-php .php
  • #3 / Nov 13, 2008 5:51pm

    jwindhorst

    99 posts

    Well, I removed the AddType, you’re right it was in the httpd.conf file already.  Restarted the service via MAMP.  Now http://localhost/  resolves properly but none of the sub pages do.  eg.  http://localhost/signin/ still tries to download the php file and save it to the machine.  http://localhost/index.php/signin/ does work.

    Any more thoughts?  ANYONE?

  • #4 / Nov 13, 2008 6:03pm

    jwindhorst

    99 posts

    Here’s an interesting addendum.  Using 127.0.0.1 instead of localhost seems to work just fine.  Likely there is an issue in the hosts file maybe?  I’m not really sure why that fixes the problem, but it does seem to, and going forward, this is only the dev environment anyway.

    If anyone can shed some light onto this problem it would still be appreciated.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases