1

検索を行い、彼らの言うことに従いましたが、リダイレクトがまだ機能していません。

.htaccess は次のようになります。

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Redirect 301 /alaska http://www.example.com/alaska-schools?
Redirect 301 ^/delaware http://www.example.com/delaware-schools?

ここで機能していないアイデアはありますか?

ありがとう

4

1 に答える 1

0

これらのリダイレクトには、mod_alias の代わりに mod_rewrite を使用することをお勧めします。両方のディレクティブ (およびそれらの 1 つがすべてを にルーティングするindex.php) を持つと、それらが競合します。また、ルーティングの前にすべてのリダイレクトが必要になります。だから、このようなもの:

RewriteRule ^alaska/?$ http://www.example.com/alaska-schools? [L,R=301]
RewriteRule ^delaware/?$ http://www.example.com/delware-schools? [L,R=301]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
于 2013-08-30T18:30:17.730 に答える