apache - mod_rewrite docroot to multiple subfolders dependant on subfolder name -
i've been trying rewriterules working , successful when using 1 host, not multiple.
i'm wanting "http://preview.domain.com" point "http://preview.domain.com/dir1" or "http://preview.domain.com/dir2", etc. dir1 , dir2 contain proxypass points real domain. here have :
rewritecond %{request_uri} !/dir1 rewriterule ^(.*)$ /dir$1 [r] <location /dir1> proxypass http://dir1.com </location>
i can't dir2 rules work beside ones above. wanting make dynamic if possible 70 folders , growing. "http://preview.domain.com" domain point dev server show dev content instead of prod content without having modify website code. provide help?
i don't understand you're trying do. if want http://preview.domain.com/nameofsite/path
map http://nameofsite.com/path
(where nameofsite
placeholder whatever domain name you're using), use
rewriterule ^/([^/]+)(/.*)$ http://$1.com$2 [p]
and wouldn't have need location
block.
Comments
Post a Comment