How to set CodeIgniter to ignore Wordpress folder?

无人久伴 提交于 2019-12-03 08:51:36

You'll want to do this with an .htaccess file (assuming your web server supports it.) For example, in the DocumentRoot of my Codeigniter site I have an .htaccess file which contains:

RewriteEngine on
RewriteCond $1 !^(index\.php|static|user_guide|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

This allows me to still access static files and the CI user guide. In your case the RewriteCond would be something like:

RewriteCond $1 !^(index\.php|blog)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!