Hi everybody I have to deploy a new version of my CakePHP application today. Sadly I don't really have control over the server it is deployed to, and I can't guarantee that nobody will try to use the website while I'm trying to deploy the new version (it's the first time I deploy, so I will need some time to try and fail until I succeed).
So I thought I could manage this using .htaccess and mod_rewrite by defining a RewriteRule that only passes my connection and forwards every other connection to a "not available" page. I did some searching and figured out the following, but it doesn't really work too well: <IfModule mod_rewrite.c> RewriteEngine on # Set your HTTP_USER_AGENT header to "I_am_the_only_allowed_person_yeah" to gain access! # Everybody else will see access_denied.php. # # Use ModifyHeaders Firefox extension: https://addons.mozilla.org/en-US/firefox/addon/967/ # Add a "User-Agent" entry using "Modify". RewriteCond %{HTTP_USER_AGENT} ^I_am_the_only_allowed_person_yeah$ RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] RewriteRule ^.*$ access_denied.php [L] </IfModule> (I guess the trick using a faked User-Agent is not too secure, but it will work for my purposes.) Sadly this doesn't really work for everything: I can access my CakePHP app's homepage, but when I'm clicking any other link, I'm getting an "Could not find XXX controller" error. Anybody got a working solution, or a better idea on how to accomplish this? As said before, I can't map my app's domain to another folder or something like that; I will have to do it another way... Thanks Josh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
