I’m trying to use the wordpress plugin Redirection to redirect a url like:
http://mysite.com/wp-content/uploads/image.jpg
to
http://mysite.com/subdir/wp-content/uploads/image.jpg
I’m trying /(wp-content/uploads/.*) and finding that it redirects to:
http://mysite.com/subdir/subdir/subdir/subdir/subdir/subdir….
and throws an error in Firefox: ‘Firefox has detected that the server is redirecting the request for this address in a way that will never complete.’
I’ve also tried:
^https?://(|www\.)mysite.com.au/(wp-content/uploads/.*)
but it seems that redirection doesn’t work with the domain – the page loads with a 404, and the URL is not altered.
Any clues appreciated!
Thanks, Tim
Changed the rule to ^/wp-content..
additionally, I think the rule was actually interacting with another rule, which seems to be solved by moving my rule to run first, although there’s nowhere to specify [L]
In future, when i’ve kept an eye on the logs to see if I’m getting it right, I’ll move the redirects into .htaccess and use the [L] flag @jason suggested.