Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Accessing media redirects to 404 error


Peter Anselmo
Participant

@peteranselmo

I’m not a RegEx pro, but looking at the above rules more carefully, something still doesn’t seem right to me.

RewriteRule ^(.*/)?files/$ index.php [L]

– URLs ending with ‘files/’ go to the home page. (doesn’t apply)

RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

– Make an exception for urls in the plugins folder (doesn’t apply)

RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

– Urls with ‘files’ get directed to blogs.php?file=… This seems closer, but it’s not actually being directed to blogs.php (or maybe it is, and it’s being directed back to the image the the file variable still appended).

:-(

Skip to toolbar