Better Apache Redirect?

Better Apache Redirect?

Post by Steve Bernacki » Fri, 19 Apr 1996 04:00:00



Hey y'all,

I'm running Apache v1.1b on our machine and need to do some minor
redirecting.  What I'd like to do is take a request such as:

        /cgi/steve/foo.pl

and redirect it to:

        /cgi-bin/cgiwrap/steve/foo.pl

which is the correct URL.  Now, I know I could use the 'Redirect' command
but it seems more oriented towards redirecting browsers to other sites
rather than other places on the local system.  I'd like to be able to
essentially change "/cgi/" in any URL passed to me to "/cgi-bin/cgiwrap/"
and THEN have Apache process it.  Is there any way to do this?

-S
--
Steve Bernacki, Jr. | Assistant System Administrator, zipnet.net

 
 
 

Better Apache Redirect?

Post by Marc G. Fourni » Fri, 19 Apr 1996 04:00:00



Quote:>Hey y'all,
>I'm running Apache v1.1b on our machine and need to do some minor
>redirecting.  What I'd like to do is take a request such as:
>    /cgi/steve/foo.pl
>and redirect it to:
>    /cgi-bin/cgiwrap/steve/foo.pl
>which is the correct URL.  Now, I know I could use the 'Redirect' command
>but it seems more oriented towards redirecting browsers to other sites
>rather than other places on the local system.  I'd like to be able to
>essentially change "/cgi/" in any URL passed to me to "/cgi-bin/cgiwrap/"
>and THEN have Apache process it.  Is there any way to do this?

ScriptAlias /cgi/ /cgi-bin/cgiwrap/

        ??
--
Marc G. Fournier | POP Mail  Telnet Acct  DNS Hosting
System           |  WWW Services   Database Services  | Knowledge,
  Administrator  |                                    | Information and


 
 
 

Better Apache Redirect?

Post by Steve Bernacki » Sun, 21 Apr 1996 04:00:00


That did it (I thought ScriptAlias only worked on directories, but I guess
it works on scripts, too!)

Thanks!
-S



: >Hey y'all,

: >I'm running Apache v1.1b on our machine and need to do some minor
: >redirecting.  What I'd like to do is take a request such as:

: >  /cgi/steve/foo.pl

: >and redirect it to:

: >  /cgi-bin/cgiwrap/steve/foo.pl

: >which is the correct URL.  Now, I know I could use the 'Redirect' command
: >but it seems more oriented towards redirecting browsers to other sites
: >rather than other places on the local system.  I'd like to be able to
: >essentially change "/cgi/" in any URL passed to me to "/cgi-bin/cgiwrap/"
: >and THEN have Apache process it.  Is there any way to do this?

: ScriptAlias /cgi/ /cgi-bin/cgiwrap/

:       ??
: --
: Marc G. Fournier | POP Mail  Telnet Acct  DNS Hosting
: System           |  WWW Services   Database Services  | Knowledge,
:   Administrator  |                                    | Information and

--
Steve Bernacki, Jr. | Assistant System Administrator, zipnet.net

 
 
 

1. Better way to do Apache hostname redirects than this?

I work for a company that has over 350 stores. Each store will have
its own URL:

<storenumber>.<mycompany>.com that redirects to a specific URL on our
main web site.

What I am planning to do right now is to add over 350 VirtualHost
entries to the Apache httpd.conf file like this:

<VirtualHost *>      
ServerName 111.mycompany.com
Redirect / http://www.mycompany.com/store.jsp?store=111
</VirtualHost>

<VirtualHost *>      
ServerName 222.mycompany.com
Redirect / http://www.mycompany.com/store.jsp?store=222
</VirtualHost>

Is this the most efficient method to do this? Can I use Rewrites?
Since the hostname and redirect URL follow the same pattern, I am
hoping I can do something more dynamic than to manually add an entry
for each store we have - since store numbers do change from time to
time. I thought I read that rewriting might help me with this problem.

Ideas, please! I am no expert. Thank you in advance!

2. getting started...

3. Apache Redirect/ReWrite for redirecting old->new domains?

4. connection script

5. Red Hat Results - better and better

6. Always appears "READ command timeout - resetting"

7. Is Windows NT a better VMS or a better Unix ?

8. how can I setup a many user pop system

9. better hw -> better sys

10. Is AMD better or Intel better for Linux?

11. I want better UserDir in Apache

12. Apache and Servlets, which OS'd be better, Linux or FreeBSD?

13. The Better Apache Book ...