2017-02-07 12:40
浏览 72

如何从Bitnami MAMP堆栈上的codeigniter中删除index.php

I have been developing using Bitnami MAMP stack 5.6.19 on my Macbook

I'm now ready to upload it to my server, but before that I want to remove the index.php from the site url and test it on my Mac so I can address any bugs.

I have tried changing the httpd-app.conf, httpd-prefix.conf as suggested on the Bitnami site, but no luck. I get a 404 error from the page.

Here is the httpd-app.conf

I change AllowOverrite from None to All

<Directory "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/htdocs">
Options +MultiViews
AllowOverride All
<IfVersion < 2.3 >
    Order allow,deny
    Allow from all
<IfVersion >= 2.3>
    Require all granted

<IfDefine USE_PHP_FPM>
   <FilesMatch \.php$>
     SetHandler "proxy:fcgi://codeigniter-fpm"


Here is the httpd-prefix.conf

I added DocumentRoot "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/htdocs" and commented out the Alias's

DocumentRoot "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/htdocs"
#Alias /codeigniter/ "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/htdocs/"
#Alias /codeigniter "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/htdocs"

Include "/Applications/mampstack-5.6.19-0/frameworks/codeigniter/conf/httpd-app.conf"

In the codeigniter config I changed $config['index_page'] = 'index.php'; to $config['index_page'] = '';

I can't edit that the .htaccess file, cause I can't locate it and from what I understand Bitnami changed the app so you don't need to change .htaccess

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题