linux - non www to www with extra redirect -


I am currently using the following code in my HTX file so that all the www server. Rewrite% {HTTP_HOST}! ^ Www. RewriteRule ^ (. *) $ Http: //www.% {HTTP_HOST} / $ 1 [R = 301, L]

Everything works fine with all sites, but Some sites are still not open to the public.

In those sites, I am using a redirect in a folder that has a "under construction page blank blah"

the following code

  rewritecond% {HTTP_HOST} ^ www.mysite.com $ [or] rewrite% {HTTP_HOST} ^ mysite.com $ rewriterule ^ mysite \ / $ "http \: \ / \ / mysite \ .com \ /beta\/beta\.html "[R = 301, L]   

Point when I get a loop and stop error in the browser when using another redirect, then how do I simultaneously with both redirects Can i work

Put your rules in the right order:

  Rewrite on rewriting Code% {HTTP_HOST} ^ (www \.)? Domain \ .com $ [NC] RewriteRule ^ mysite /? $ Http://domain.com/beta/beta.html [R = 301, L, NC] RewriteCand% {HTTP_HOST}! ^ Www. RewriteRule! ^ Beta / Beta \ .html $ http: //www.% {HTTP_HOST}% {REQUEST_URI} [R = 301, L, NC, NE]    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -