Reputation: 2595
my pdf files have adresses like any string...-file.pdf. They will change to any string ... -new-file.pdf i tried to redirect with
RewriteRule ^-file\.pdf$ ^-new-file.pdf$ [R=301,L,NC]
but it doesn't work. What can be done to proper redirect them?
Upvotes: 0
Views: 50
Reputation: 18671
If I understand it's for files like xxxx-file.pdf...
You can use:
RewriteRule ^(.*)-file\.pdf$ $1-new-file.pdf [R=301,L,NC]
Upvotes: 2