OSX 10.6.8 Snow Leopard - removing index.php from URL via userdir |
[eluser]Unknown[/eluser]
I had a fair bit of trouble with this... (not alone I gather) and from what I've found on this forum, SO & Google nothing really matched my issue. So in altruistic fashion, here's what worked for me: Background: Mac OSX 10.6.8. Default, vanilla PHP install using userdirs (i.e. localhost/~username) NOT MAMP Edit /etc/apache2/users/[your_username].conf - for me, by default, AllowOverride was set to None. This will ignore any .htaccess files. You can set it to all but FileInfo will suffice for redirects, Limit for host access. See here for further details on allow override Code: <Directory "/Users/[your_username]/Sites/"> You could change the /etc/apache2/httpd.conf if you want, but that'll make it global. Restart Apache: Code: sudo apachectl restart Code: RewriteEngine on Don't forget to change config/config.php to blank Code: $config['index_page'] =''; And you should be good to go. If you still have trouble check the apache2 error_log (use Console) to see what's going on. That's what pointed me in the right direction with a bit of trial and error. The RewriteBase directive was key... I'm currently developing a RESTful API using Phil Sturgeons lib (good work Phil) and the redirects work just as well. Carry on. |
Welcome Guest, Not a member yet? Register Sign In |