0
Windowsサーバでweb.configでこれを行うことができましたが、.htaccessと同等のものはわかりません。基本的にindex.htmlを削除するだけの場合... URLは、ルートまたはサブディレクトリになります。ディレクトリインデックススクリプトを.htaccessを使用してディレクトリに移動(リダイレクト)
foo.com/index.html >>なるfoo.com/
foo.com/subdir/index.html >>なるfoo.com/subdir/
更新日:私が働いている.htaccessファイルはこれで動作します。
DirectoryIndex index.php
<Files .htaccess>
deny from all
</Files>
Options All -Indexes
ServerSignature Off
Options +FollowSymLinks
RewriteEngine On
RewriteBase/
redirectMatch 301 /donation/? /donate/
redirectMatch 301 /giftcard(.*) /gift-card/
RewriteRule ^specials/([0-9]+)/ /specials/index.php\?id=$1 [NC,L]
は、.htaccessファイル内で作業していないようです。私はそのファイルで作業している他の多くのルールを持っていますが、これはまだトリックではありません。何か案は? – Dan
btw私はこのルールを私のApacheでテストしたところ、うまくいきました。 – anubhava
元の投稿を更新して、作業用の.htaccessファイルを追加しました。 私はそれをすべて落としてコードに貼り付けましたが、それでも機能しませんでした。 – Dan