httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Anthony.Br...@gdc4s.com>
Subject RE: [users@httpd] internal redirect
Date Mon, 25 Apr 2011 21:54:55 GMT
So I finally got this legacy web client to run my services successfully
by the following line of reasoning:  If he is hardcoded to POST to
http://mydomain:myport/WebService  with no trailing slash, then I
created a file in my htdocs directory named WebService.php and used the
Rewriting Engine as follows:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^.])$ /$1.php


This works for my http interface, but on my https interface using a
separate virtual server, the web server sends back a 406 Not Acceptable,
saying an appropriate representation could not be found.  He also sends
back "Avaliable Variants:  WebService.php type application/x-httpd-php"

So, how can I get the Virtual Server to also run the WebServer.php?

Thanks
Tony

-----Original Message-----
From: Brown, Tony-P56943 
Sent: Tuesday, April 12, 2011 10:04 AM
To: 'users@httpd.apache.org'
Subject: RE: [users@httpd] internal redirect

According to the apache documentation for mod_alias

"First, all Redirects are processed before Aliases are processed, and
therefore a request that matches a Redirect or RedirectMatch will never
have Aliases applied."

Without the trailing slash, the web server applies the slash and sends a
redirect to the client. My aliases are ignored.  This would not be a
problem except that the legacy client software will not follow
redirects.  He will simply say he could not connect to the web service.
Perhaps one could consider this to be broken, but we have a need to make
this legacy client connect to our web service.  Additionally, this
particular web service client has never previously been used with an
apache web server, it was built to work with some java based web server
on Win2K3.

-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: Monday, April 11, 2011 3:54 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] internal redirect

On Mon, 11 Apr 2011 14:26:49 -0700
<Anthony.Brown@gdc4s.com> wrote:

> I have a web server which provides web services at the url
> http://someplace:port/SERVICES/

If that's apache, you can provide services at your choice of URL,
with or without the slash.

> There is client software which [...]

Are you sure?  Sounds broken.

> I have tried Alias, but the Redirects are processed first.

What redirects?

If you mean mod_dir appending a trailing slash, disable it.
If something else, find out what it is and stop it.

> I have used the rewrite engine

An excellent instrument with which to shoot yourself in the foot.

> How can I get apache to do an internal redirect, and NOT send an
> external redirect.  

Alias.

But far better to have matching expectations at the client and server,
by configuring your service at /SERVICES in the first place:
<Location /SERVICES>
	SetHandler my-web-service
</Location>

-- 
Nick Kew

Available for work, contract or permanent.
http://www.webthing.com/~nick/cv.html

---------------------------------------------------------------------
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


Mime
View raw message