PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Alias doesn't do what I want.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Alias doesn't do what I want.

Réponse
 
LinkBack Outils de la discussion
Vieux 01/06/2005, 02h15   #1
Patrick L. Nolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Alias doesn't do what I want.

On our apache 2 server there's a static html file
http://server.domain/foo.html

I would like to replace it with a cgi script, but have
the old URL continue to work. I can redirect it OK with
the command
Redirect temp /foo.html http://server.domain/cgi/foo.cgi

Of course that makes the redirection obvious. The new URL
shows up in the browser address window. It would be cooler
to make it completely transparent. It seems to me that
Alias should do this with something like
Alias /foo.html /cgi/foo.cgi
or perhaps
Alias /foo.html /usr/local/httpd/cgi/foo.cgi

Alas, neither of these works. The first gives a 404 error
while the second displays the text of the cgi script instead
of running it. The same thing happens with AliasMatch.
Clearly there's something I haven't understood here.
What's the key?

--
* Patrick L. Nolan *
* W. W. Hansen Experimental Physics Laboratory (HEPL) *
* Stanford University *
  Réponse avec citation
Vieux 01/06/2005, 12h00   #2
Ray Pearce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Alias doesn't do what I want.

Patrick L. Nolan wrote:
> On our apache 2 server there's a static html file
> http://server.domain/foo.html
>
> I would like to replace it with a cgi script, but have
> the old URL continue to work. I can redirect it OK with
> the command
> Redirect temp /foo.html http://server.domain/cgi/foo.cgi
>
> Of course that makes the redirection obvious. The new URL
> shows up in the browser address window. It would be cooler
> to make it completely transparent. It seems to me that
> Alias should do this with something like
> Alias /foo.html /cgi/foo.cgi
> or perhaps
> Alias /foo.html /usr/local/httpd/cgi/foo.cgi
>
> Alas, neither of these works. The first gives a 404 error
> while the second displays the text of the cgi script instead
> of running it. The same thing happens with AliasMatch.
> Clearly there's something I haven't understood here.
> What's the key?


ScriptAlias /foo.html /usr/local/httpd/cgi/foo.cgi


  Réponse avec citation
Vieux 01/06/2005, 17h28   #3
Patrick L. Nolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Alias doesn't do what I want.

Ray Pearce <ray.pearce@macro4nouce.com> wrote:
> Patrick L. Nolan wrote:
>> On our apache 2 server there's a static html file
>> http://server.domain/foo.html
>>
>> I would like to replace it with a cgi script, but have
>> the old URL continue to work. I can redirect it OK with
>> the command
>> Redirect temp /foo.html http://server.domain/cgi/foo.cgi
>>
>> Of course that makes the redirection obvious. The new URL
>> shows up in the browser address window. It would be cooler
>> to make it completely transparent. It seems to me that
>> Alias should do this with something like
>> Alias /foo.html /cgi/foo.cgi
>> or perhaps
>> Alias /foo.html /usr/local/httpd/cgi/foo.cgi
>>
>> Alas, neither of these works. The first gives a 404 error
>> while the second displays the text of the cgi script instead
>> of running it. The same thing happens with AliasMatch.
>> Clearly there's something I haven't understood here.
>> What's the key?


> ScriptAlias /foo.html /usr/local/httpd/cgi/foo.cgi


Thanks. That does the job.

--
* Patrick L. Nolan *
* W. W. Hansen Experimental Physics Laboratory (HEPL) *
* Stanford University *
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h54.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10427 seconds with 11 queries