代码之家  ›  专栏  ›  技术社区  ›  Shubham Agrawal

如何将我的域直接指向codeigner文件夹?

  •  0
  • Shubham Agrawal  · 技术社区  · 4 年前

    www.example.com

    现在我希望在这个域中,我的索引页或CodeIgniter文件夹的主控制器应该打开 没有文件夹名

    From: www.example.com/folder 
    To: www.example.com
    

    我在hostinger上托管我的文件。我不想删除我的文件夹并将所有结构导出到基 public_html .

    我想要我的 公共html 包含我的CodeIgniter文件夹。

    任何帮助都将不胜感激!

    0 回复  |  直到 4 年前
        1
  •  1
  •   Hasta Dhana    4 年前

    规则:

    Options +FollowSymLinks
    
    RewriteEngine On
    RewriteBase /YOUR_SUBFOLDER
    
    RewriteRule ^$ index.php [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
    
    RewriteRule ^(.*)$ index.php?/$1 [L]
    

    更改 YOUR_SUBFOLDER