0

次のような URL をリダイレクトしようとしています。

http://www.example.co.uk/pdfs/example-file.pdf

http://www.example.co.uk/files/example-file.pdf

http://www.example.co.uk/documents/example-file.pdf

ベースドメインへhttp://www.example.co.uk/

# PDFs on old site, redirect them
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/?pdf/(.*)$ http://www.example.co.uk/$1 [R=301,L]
    RewriteRule ^/?files/(.*)$ http://www.example.co.uk/$1 [R=301,L]
    RewriteRule ^/?documents/(.*)$ http://www.example.co.uk/$1 [R=301,L]
</IfModule>
# END PDFs on old site, redirect them

ここでどこが間違っていますか?

4

1 に答える 1