CodeIgniter site in subdirectory, htaccess file maybe interfering with htaccess file in main directory?

狂风中的少年 提交于 2019-12-01 20:49:55

The CI .htaccess shouldn't be in the application folder; it should be in the root of theSubDomain folder. e.g. /public_html/SubDomain/.htaccess

Also, in that .htaccess, you need to set the RewriteBase:

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /SubDomain
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?$1 [L]
</IfModule>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!