我的文件夾結(jié)構(gòu)根域assets/ (包含 css, images, js 文件夾)子文件夾/(包含內(nèi)部的 Codeigniter 項(xiàng)目和單獨(dú)的 .htaccess)索引.php聯(lián)系人.php.htaccess根 HtaccessOptions +FollowSymLinksRewriteEngine onRewriteCond %{REQUEST_URI} !(.*)subfolderRewriteRule ^(.*)$ subfolder/$1 [L]子文件夾(Codeigniter 項(xiàng)目)HtaccessDirectoryIndex index.php index.html<IfModule mod_rewrite.c>RewriteEngine OnRewriteCond $1 !^(index\.php|assets|install|update)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d# For godady Shared Hosting Server uncomment the line belowRewriteRule ^(.*)$ index.php?/$1 [L]</IfModule>子文件夾 URL 列表http://example.com/subfolder/products/http://example.com/subfolder/product/product-slug-123根 URL 列表http://example.com/index.phphttp://example.com/contact.php在我的 Codeigniter 項(xiàng)目中,我將Products控制器設(shè)置為default_controller. 所以問題是,當(dāng)我嘗試訪問根文件夾中的 index.php 頁面時(shí),它只將 Codeigniter 產(chǎn)品列表顯示為主頁。我需要以下網(wǎng)址:http://example.com/index.phphttp://example.com/contact.phphttp://example.com/products/http://example.com/product/product-slug-123任何帶有 htaccess 或代碼的解決方案?
僅使用 Htaccess 刪除指定 URL 的子文件夾 [Codeigniter]
慕碼人2483693
2022-01-14 18:05:48