You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Douville <st...@douville.net> on 2004/06/17 19:23:19 UTC

[users@httpd] Redirect Help Please

Okay, I've read the docs and I'm still having trouble.

Given my docroot:
/somepath/htdocs

I want to redirect any requests to www.mydomain.com index page to
/somepath/docs/temp while I build the site.

I'm building a site under the url build.mydomain.com which is pointing to
the docroot. Now, it's a shopping cart that works just fine under that url,
but when it comes time to go SSL, it needs to read from
https://www.mydomain.com, because of the ssl certificate. The ssl path
shares the same docroot.

Here's what I've tried but that doesn't work. It still manages to find the
index page of the site I'm building.

RedirectTemp http://www.mydomain.com/ http://www.mydomain.com/temp/

Any help is appreciated. I hope the request makes sense. :-)

TIA,
Steve


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirect Help Please

Posted by Steve Douville <st...@douville.net>.
Perfect. Thanks.
----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Thursday, June 17, 2004 2:02 PM
Subject: Re: [users@httpd] Redirect Help Please


> On Thu, 17 Jun 2004, Steve Douville wrote:
> > RedirectTemp http://www.mydomain.com/ http://www.mydomain.com/temp/
>
> The first argument to Redirect* is a local-web-path, not a URL.  For
> example:
> RedirectTemp / http://www.mydomain.com/temp/
>
> But it seems like you wouldn't want the default Redirect behavior, which
> is to do sub-string matching ("/" matches anything beginning in "/").  So
> probably what you want is
>
> RedirectMatch temp ^/$ http://www.mydomain.com/temp/
>
> which hits only requests for the homepage.
>
> If you want to restrict this to only a particular source-hostname, then
> you need to place it within an appropirate <VirtualHost> section.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirect Help Please

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 17 Jun 2004, Steve Douville wrote:
> RedirectTemp http://www.mydomain.com/ http://www.mydomain.com/temp/

The first argument to Redirect* is a local-web-path, not a URL.  For 
example:
RedirectTemp / http://www.mydomain.com/temp/

But it seems like you wouldn't want the default Redirect behavior, which 
is to do sub-string matching ("/" matches anything beginning in "/").  So 
probably what you want is

RedirectMatch temp ^/$ http://www.mydomain.com/temp/

which hits only requests for the homepage.

If you want to restrict this to only a particular source-hostname, then 
you need to place it within an appropirate <VirtualHost> section.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org