1st off I know about the redirect add-ons, but I need to do this in my .htaccess and not load any more on EE.
Before I found EE and started making EE sites. I used a free gallery program to create my gallery for my web site. Now I'm moving over the images to my EE built gallery.
Many thousands of images, no problem just htaccess it. For the most part old folders went to new posts. A few old galleries needed each picture sent to it's correct post entry.
After creating and testing all looked great, had to do a little more that I would have thought. Then I removed the old files and directories for the RewriteRule's I created.
Now I get my EE 404 and lost page notices.
Then if I recreated the directories, those would work. Then recreated empty html docs named the same as the previous html doc, and then those RewriteRule's worked.
I think if EE sees link to an actual folder it leaves it alone, but if no template for folder exists it serves 404.
(I have switchee checking segments and EE no post settings to verify all pages of my EE site)
But why is EE still serving something thats in the .htaccess
Could add some more to my 404 segment check. Rather not.
Or continue to create empty directories and empty same named html files for a fix, but why?
Before deleting the old files this is what I had to do to get all files and sub directories to redirect to new post entry.
RewriteRule gallery/Trees/(.+)?/?$ http://mydomain.com/entry/trees_and_plants [L,R=301]
But as of this moment I have to recreate every doc as an empty file named the same. But could there be a way to have EE ignore certain directories?
Thanks Mike
More info,
Basically after my rewrites, pages from my old gallery will be redirected to my new gallery. But as soon as I removed the old galleries files and directories my EE pick up on the bad pages and serves up my 404. right now having problems with gallery/Trees dir and pages.
Here is a shorten version of my htacces
RewriteEngine On RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteBase / RewriteCond %{HTTP_HOST} ^www.mydomain.com [NC] RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301] RedirectMatch 301 /forums/(.*) http://mydomain.com/NEW_forums/$1 RewriteCond %{QUERY_STRING} /forums/ RewriteRule (.*) http://mydomain.com/NEW_forums/? [R=301,L] RewriteRule ^gallery/Trees/ http://mydomain.com/entry/lego_trees_and_plants [L,R=301] deny from somedomain.com RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?otherdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?otherdomain2.com [NC] RewriteRule \.(jpg|jpeg|png|js|css|ldr|zip|lxf)$ http://mydomain.com/ask4_hotlink_mydomain_com.gif [NC,R,L] ##EE Spam Block blah, blah, blah ##End EE Spam Block