Removing index.php in CodeIgniter using .htaccess file

后端 未结 6 2446
悲&欢浪女
悲&欢浪女 2020-12-15 13:32

I\'m currently developing a website using CodeIgniter and I recently stumbled upon a routing & .htaccess problem.

Basically, the structure of my simple website (

6条回答
  •  抹茶落季
    2020-12-15 13:57

    for Codeigniter 3.1.4
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php56” package as the default “PHP” programming language.
    
      AddType application/x-httpd-ea-php56 .php .php5 .phtml
    
    # php -- END cPanel-generated handler, do not edit
    
    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    
       php_flag asp_tags On
       php_flag display_errors On
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 512M
       php_value post_max_size 128M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
       php_value upload_max_filesize 128M
       php_flag zlib.output_compression Off
    
    # END cPanel-generated php ini directives, do not edit
    
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    
    

提交回复
热议问题