htaccess too many redirect
-
Hi,
I am having issue with custom ‘wp-content/uploads’ url rewrite.
I have “renamed” the ‘wp-content/uploads’ folder to ‘files’ in the module settings.
However, I would like direct links to “wp-content/uploads” to be accessible at the same time WITHOUT redirecting it to 404 page, or rather it should be redirected/rewritten to ‘files’.
How should I go about changing the rules in .htaccess to remove the 404 redirection and to 301 redirect it/rewrite the URL?
Below is the existing rules in .htaccess:
# BEGIN WP Hide & Security Enhancer ... RewriteRule ^files/(.+) /wp-content/uploads/$1 [L,QSA] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^wp-content/uploads/(.+) /index.php?wph-throw-404 [L] RewriteCond %{ENV:REDIRECT_STATUS} ^$ ... # END WP Hide & Security EnhancerIf i try to put the following rule all the way at the top of htaccess, it will say TOO_MANY_REDIRECTS:
RewriteRule ^wp-content/uploads/(.+)$ /files/$1 [R=301,L]Please help, thanks
The topic ‘htaccess too many redirect’ is closed to new replies.