.htaccess throws a 500 error

后端 未结 2 1378
后悔当初
后悔当初 2021-01-26 00:59

I am using CodeIgniter and need to get rid of the \"index.php\" in the URL. I copied the .htaccess file from codeigniter tutorial, emptied the $config[\'index_page\'] = \'\'; an

相关标签:
2条回答
  • 2021-01-26 01:35

    If this is really part of the .htaccess file, it would cause your problem:

    RewriteRule ^{.*)$ /index.php?/$1 [L]
                ^^^ typo?
    

    Should be:

    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    0 讨论(0)
  • 2021-01-26 01:35

    I too had the same problem but my code was correct and i was using wamp server, then I found rewrite module is not enabled

    so went to apache/conf/httpd.conf and uncommented line

    LoadModule rewrite_module modules/mod_rewrite.so

    Now its working fine.

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