Forums / General Questions / htaccess issues with trying to redirect images to new folder

htaccess issues with trying to redirect images to new folder

Views: 563

Results 1 to 1 of 1
11 Oct 2016, 4:18 PM
#1
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

htaccess issues with trying to redirect images to new folder

I have a subfolder in my images folder that contains a type of report that had a recent name change, lets say from "oldforms" to "newforms" ...
Essentially what I want to do is redirect all files in https://www.site.com/images/oldforms/ to https://www.site.com/images/newforms/

I created redirects in the existing htaccess files at root and in the images folder...
Root:
RewriteRule ^images/oldforms/(.*)$ http://www.site.com/images/newforms/$1 [R,L]

Images Folder:
RewriteEngine On
RewriteRule ^oldforms/(.*)?$ images/newforms/$1 [R,L]

These both work fine EXCEPT the security configuration in the images folder htaccess (below) blocks the redirect.
#deny everything
<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>

If I comment out the configuration, no problem, I tried adding htaccess to allowed, which is probably a terrible idea, but it did't work anyway. Any htaccess gurus out there that can help me out?

The whole point of this exercise is to eventually redirect search engines that have crawled the old folder.