CodeIgniter htaccess subfolder problem

前端 未结 1 1241
悲哀的现实
悲哀的现实 2021-01-06 10:39

I want a second website in my domain inside the folder test

www.mydomian.com/test

Apache server running on linux.

But when I load it in my navigator

相关标签:
1条回答
  • 2021-01-06 11:05

    Try adding a .htaccess file into your test folder instead.

    I use this .htaccess content:

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

    In the folder test I would place another .htaccess, with almost the same content:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /test/index.php?/$1 [L]
    
    0 讨论(0)
提交回复
热议问题