apache - Redirect to another subdomain unless viewing a directory -


i have site has been moved behind load balancer. wasn't issue until client tried use functions take long time complete - apparently hits load balancer's timeout , action fails. know ideally functions rewritten run faster, or using background process, client isn't willing pay right workaround devised.

i able create url goes directly server's ip, bypassing load balancer, don't want general users able access site url. such, i'm trying create .htaccess rule 301s user site's main url unless view admin page. can tell, correct format should be:

rewritecond %{http_host} bypass.mydomain.com rewritecond %{request_uri} !^admin rewriterule (.*) http://www.mydomain.com/$1 [r=301,l] 

that should, understanding:

  • if user on bypass.mydomain.com
  • and uri visited not start "admin"
  • forward user bypass.mydomain.com www.mydomain.com

this doesn't seem working, however. instead, forwards every time. ideas?

you may checked have .htaccess file working? if not, caused allowoverride parameter. see doc

alexis


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -