Codeigniterのurlから "index.php"を削除しようとしています。 index.phpをbase URLから削除する方法を知っています(example.com/controller)。codeigniter index.phpフォームのURLを削除する
しかし、私はCodeIgniterの中に別のプロジェクトに持っているのでexample.com/folder/index.php/controller
のようにサブフォルダ内の「index.phpを」を削除する方法がわかりません。ので、私はサブフォルダにアップロードされた2番目のプロジェクト。
の.htaccess
#original
#RewriteEngine on
#RewriteCond $1 !^(index\.php|images|robots\.txt)
#RewriteRule ^(.*)$ index.php/$1 [L]
#modify
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
RewriteBase/
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
ベースURLの上記のプログラム。ですから、私はこのプログラムで何が変わるのかは、サブフォルダで動作します。
ありがとう...それは働いています – joy
あなたの歓迎.... – Gagan