簡體   English   中英

CodeIgniter URL重寫-但不在XAMPP目錄上

[英]CodeIgniter URL rewrite - but not on the XAMPP directory

我想從CodeIgniter服務的所有頁面中取出index.php但我希望仍然能夠照常訪問XAMPP文件夾中的所有內容。

這是我的目錄結構:

htdocs\
.\Application\
.\XAMPP\

我的.htaccess文件:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L]

因此,我希望能夠以http:\\\\localhost\\controller\\method\\arg而不是http:\\\\localhost\\index.php\\controller\\method\\arg看到我的應用程序。

但是我還希望能夠看到http:\\\\localhost\\XAMPP\\index.php -XAMPP像MySQL一樣具有我的控制面板,並且我無法將其.htaccess文件放在適當的位置(因為它會重寫為http:\\\\localhost\\XAMPP\\而不是http:\\\\localhost\\XAMPP\\index.php )。

這可能嗎,我該怎么辦?

如果我很好理解您的問題,只需使用指令RewriteEngine off將.htaccess文件放入XAMPP目錄。 它應該工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM