0
すべてのページを/から何も転送しない方法がありますか?だから、例えば私は、この301スラッシュを取り除くためのリダイレクト
http://somesite.com/something/ ==> http://somesite.com/something
http://somesite.com/another_thing/ ==> http://somesite.com/another_thing
http://somesite.com/page3/ ==> http://somesite.com/page3
http://somesite.com/page4/ ==> http://somesite.com/page4
PAGE3、page4、何か、another_thingは全てそれぞれにindex.phpファイルとディレクトリです...そしてこれは私は私は私のhtaccessファイルにそれを
を取り扱う方法ですたいです誰もが、彼らが事前にcached.thanksであっても、非スラッシュページに終わるので、私は基本的にはSEOの理由のために301リダイレクトするこの
DirectorySlash Off
RewriteCond %{REQUEST_FILENAME}/index\.php -f
RewriteRule ^(.+)$ /$1/index.php [NC,QSA,L]
で/を取り払う
この
私のhtaccessの直前に移動します – Trace
同じ.htaccessファイルに属します。私はそれを他のrewriteCond/Ruleの前に置くので、次の行でより明確になります。 – hakre