.htaccess ファイルを含むすべての Web ファイルを PC にコピーしました。そして今、XAMPPで実行しています。私はこの問題、この.htaccessファイルを手に入れました:
DirectoryIndex otherindex.php //<<--this line works, it changes my index.
//but the rest is not: I need to redirecting all request (except existing dir/file) to index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
ライブサーバーでは機能するのに、XAMPP では機能しない理由がわかりません。両方で動作させるにはどうすればよいですか?何か助けてください。
更新:
私は自分をチェックし、httpd.conf
これをコメント解除します:
LoadModule ssl_module modules/mod_rewrite.so
注: デフォルトの htdocs フォルダーを別の場所に移動します。