Remove index.php from codeigniter in xamp

前端 未结 7 919
名媛妹妹
名媛妹妹 2021-01-21 07:11

I\'ve tried quite a few answers but keep coming up against the good ol, 404 wall of terror. I\'m on Windows 7 using a xamp stack. mod_rewrite is enabled.

I put the htacc

相关标签:
7条回答
  • 2021-01-21 08:08

    I was facing the same error again and again but after little research, I found a solution.

    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /Codeigniter_start/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /Codeigniter_start/index.php/$1 [L,QSA] 
    
    </IfModule>
    

    The important point is, the project folder. Like I use RewriteBase /Codeigniter_start/ and RewriteRule ^(.*)$ /Codeigniter_start/index.php/$1 [L,QSA].

    Also change from config file index_page like this.

     $config['index_page'] = '';
    

    Hope this will help.

    0 讨论(0)
提交回复
热议问题