Forum Moderators: phranque
Place all code in one main htaccess file in the root directory meaning its grows quite large and every request has to read it. Split the file up so you only place each redirect or wotever code in the specific directory the file would be called from.
Depending on your traffic, an .htaccess filesize of 250KB might be acceptable, while on a very busy site, a 75KB .htaccess file might introduce a noticeable delay in serving pages.
There are some other "middle of the road" techniques as well. For example, you might add logic to your 410-Gone ruleset to skip processing if the request is not for a particular list of subdirectories. Or skip proicessing if the request is not for "page" filetypes. For example:
RewriteCond %{REQUEST_URI} ^/removed-page1\.html$ [OR]
RewriteCond %{REQUEST_URI} ^/removed-page2\.htm$ [OR]
RewriteCond %{REQUEST_URI} ^/removed-page3\.shtml$ [OR]
RewriteCond %{REQUEST_URI} ^/removed-page4\.shtm$ [OR]
RewriteCond %{REQUEST_URI} ^/removed-page5\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/removed-page6\.php5$
RewriteRule \.(s?html?¦php[1-5]?)$ - [G]
Jim