我與GoDaddy託管使用笨3我的網站的一個問題,它的工作主要網頁,但是當我點擊鏈接它需要像www.example.com/index.php/submodule/subdir
,在godaddy上爲CodeIgniter 3託管的問題?
我不明白我怎麼能解決它,使用它像www.example.com/sumodule/subdir
我使用這個的.htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $l !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$l [L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
請檢查[這個答案](http://stackoverflow.com/questions/28682210/how-to-remove-index-php-with-codeigniter-in-godaddy-com#answer-28682743)如果是對你有幫助。 – Tpojka
如果您正在使用mod_rewrite刪除頁面,請將此變量設置爲空白。 $ config ['index_page'] =''; – Vickel
確保您已將htaccess放置在主應用程序文件夾的外面。 – user4419336