我是CAKEPHP的新手。我從服務器複製文件並導入到本地主機。 CSS和圖像沒有加載。我取消註釋 Configure :: write('App.baseUrl',env('SCRIPT_NAME'));現在網站正在顯示,但url包含index.php。刪除index.php從url下載PHP
-1
A
回答
0
1)從apache服務器打開「mod_rewrite」。
2)評 「配置::寫( 'App.baseUrl',ENV( 'SCRIPT_NAME'));」 這條線從/confige/core.php
+0
我完成了2個步驟,但是當我將它們上載到Centos服務器時,url也包含index.php –
+0
您必須重新啓動Apache服務器。 – DevXcell
相關問題
- 1. php:在url中刪除index.php
- 2. 如何從PHP中刪除index.php URL
- 3. 從URL刪除index.php - Codeigniter 2
- 4. 從wordpress URL刪除index.php
- 5. 從joomla url刪除index.php 2.5
- 6. 從url中刪除index.php Codeigniter
- 7. Htaccess從URL中刪除Index.php
- 8. 從CodeIgniter 3 URL刪除index.php
- 9. codeIgniter Index.php從URL中刪除
- 10. 從url中刪除index.php
- 11. Magento從URL刪除index.php
- 12. 從子域URL刪除Index.php
- 13. 從URL刪除index.php,Laravel 5.2
- 14. 從URL中刪除/index.php/ .htacess
- 15. 刪除的index.php從URL
- 16. htaccess從url中刪除index.php
- 17. 從URL Codeigniter刪除index.php 1.7.2
- 18. 從CodeIgniter URL中刪除index.php
- 19. 從cakephp url中刪除index.php
- 20. 從url中刪除index.php htaccess
- 21. 從URL中刪除index.php?dir =?
- 22. 無法從Codeignitor 3.0 URL中刪除index.php
- 23. 如何從url中刪除index.php/html
- 24. 我無法從CodeIgniter URL中刪除index.php
- 25. CodeIgniter:無法從URL中刪除index.php
- 26. 如何從MediaWiki的URL中刪除index.php?
- 27. 如何從CodeIgniter的URL中刪除index.php?
- 28. 從codeigniter中的url中刪除index.php
- 29. 如何從笨URL刪除的index.php
- 30. cakephp web.config窗口刪除從URL的index.php
確保阿帕奇mode_rewrite啓用 –
阿帕奇mode_rewrite已啓用。 Htaccess是問題。我下載了新的CakePHP並複製了該htaccess,現在正在工作。謝謝 – user2508506
正確地重申您的問題,您不可能同時使用1.3和2.0版本,您的確切版本是什麼?另外,如果您認爲.htaccess是問題,請將其發佈到問題中,即使它是蛋糕的安裝htaccess,問題應該包含所有相關信息。 – Nunser