CodeIgniter removing index.php not working

后端 未结 4 728
悲&欢浪女
悲&欢浪女 2021-01-15 04:12

I\'m using Ubuntu 13 with the following setup for a local codeigniter site.

Apache/2.4.6 (Ubuntu)
5.5.3-1ubuntu2.2 
\'CI_VERSION\', \'2.1.2\'
4条回答
  •  囚心锁ツ
    2021-01-15 04:52

    Place the .htaccess file in the project folder like this:

    htdocs/your_project/.htaccess

    Try this new code for .htaccess:

    RewriteEngine on 
    RewriteBase /your-project-directory-name/ 
    RewriteCond $1 !^(index.php|resources|robots.txt) 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
    

提交回复
热议问题