Codeigniter subdomain routing

前端 未结 4 748
时光取名叫无心
时光取名叫无心 2021-02-01 08:10

I\'m trying to setup a blog script on a website running on the CodeIgniter framework. I want do this without making any major code changes to my existing website\'s code. I figu

4条回答
  •  甜味超标
    2021-02-01 08:41

    After 4 days of trial and error, I've finally fixed this issue!

    Turns out it was a .htaccess problem and the following rules fixed it:

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    

    Thanks to everyone that read or answered this question.

提交回复
热议问题