Page is a not externally linkable
jdMorgan - 4:57 pm on Jan 12, 2008 (gmt 0)
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: Jim
It's a trade-off between file size and maintainability. On the one hand, you might say, "let the computers do the work" in order to get the benefit of centralized administration, while on the other, you might be more concerned with reducing the work that the server must do to handle each request.
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]
Here, all of the RewriteConds are skipped unless the request is for a "page" filetype, due the way that mod_rewrite processes RewriteConds only if the RewriteRule pattern matches (see documentation). As a result, the majority of requests to the site --usually requests for images, CSS, etc.-- will not require the RewriteConds to be processed.