[英]My .htaccess file is not working
我已經在免費托管000webhost上添加了我的項目,並且我的所有文件都列在public_html /目錄中。 該項目內置在codeigniter中。 我在public_html / .htaccess中添加了htaccess文件,其中包含
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
但這對我不起作用htaccess中是否有任何問題?
我使用它(它在本地和遠程都適用於我):
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|css|js|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
您需要在根rolder和css,js等的子文件夾中創建一個名為“ public”的文件夾。
對不起,我所有的htaccess都可以,但是我的基本url中有一個額外的問題,這引起了問題。 再次抱歉。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.