Welcome Guest, Not a member yet? Register   Sign In
MAMP and .htaccess issues
#1

[eluser]jwindhorst[/eluser]
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:
Code:
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:
Code:
$config['base_url'] = "http://localhost/";
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";

Any help would be greatly appreciated!
#2

[eluser]GSV Sleeper Service[/eluser]
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
Code:
AddType application/x-httpd-php .php
#3

[eluser]jwindhorst[/eluser]
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

[eluser]jwindhorst[/eluser]
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.




Theme © iAndrew 2016 - Forum software by © MyBB