[vox-tech] Need help creating rewritecond in Apache

2008-12-16 Thread Richard S. Crawford
The problem: For the next few days, when visitors browse our site, we
need to redirect them to a different subdomain, www2. However, there
are some resources on our original site that visitors will need to
view from that subdomain; these resources are typically retrieved by a
script called view.php. In the resources subdirectory there's an
.htaccess file that redirects back to the main domain, but, of course,
the rewrite script on the main server simply sends the user back to
the www2 subdomain.

Can anyone help?

-- 
Richard S. Crawford (rscrawf...@mossroot.com)
http://www.mossroot.com
Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com)
___
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Need help creating rewritecond in Apache

2008-12-16 Thread Alex Mandel
Richard S. Crawford wrote:
 The problem: For the next few days, when visitors browse our site, we
 need to redirect them to a different subdomain, www2. However, there
 are some resources on our original site that visitors will need to
 view from that subdomain; these resources are typically retrieved by a
 script called view.php. In the resources subdirectory there's an
 .htaccess file that redirects back to the main domain, but, of course,
 the rewrite script on the main server simply sends the user back to
 the www2 subdomain.
 
 Can anyone help?
 

Can you post the relevant part of your rules, it sounds like you need an
exception to the initial redirect to allow access to the particular
resource on the original server.


Alex
___
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Need help creating rewritecond in Apache

2008-12-16 Thread Richard S. Crawford
On Tue, Dec 16, 2008 at 4:22 PM, Alex Mandel tech_...@wildintellect.com wrote:

 Can you post the relevant part of your rules, it sounds like you need an
 exception to the initial redirect to allow access to the particular
 resource on the original server.

Alex,

Actually, at this point, I just convinced my boss that it would be
easier to copy the resource files over to the temporary subdomain,
rather than try to come up with a complicated set of rewrite rules.
Thanks, though.

-- 
Richard S. Crawford (rscrawf...@mossroot.com)
http://www.mossroot.com
Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com)
___
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Need help creating rewritecond in Apache

2008-12-16 Thread Susan Baur
Richard,

If I remember correctly, rewrite rules are order dependent. So you may  
want to use the rewrite engine instead of redirect.

Then, you could do something like
RewriteEngine On
  RewriteRule ^/view.php_dir - [L]
  RewriteRule ^(.)$ http://www2.yoursite.com/$1 -[P]

HTH,
--Susan


On Dec 16, 2008, at 4:08 PM, Richard S. Crawford wrote:

 The problem: For the next few days, when visitors browse our site, we
 need to redirect them to a different subdomain, www2. However, there
 are some resources on our original site that visitors will need to
 view from that subdomain; these resources are typically retrieved by a
 script called view.php. In the resources subdirectory there's an
 .htaccess file that redirects back to the main domain, but, of course,
 the rewrite script on the main server simply sends the user back to
 the www2 subdomain.

 Can anyone help?

 -- 
 Richard S. Crawford (rscrawf...@mossroot.com)
 http://www.mossroot.com
 Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com 
 )
 ___
 vox-tech mailing list
 vox-tech@lists.lugod.org
 http://lists.lugod.org/mailman/listinfo/vox-tech

___
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech