You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Jerry P." <ok...@desidesh.com> on 2003/12/07 07:33:43 UTC

[users@httpd] AddHandler & Action Redirect/Remapping Issues in Apache 2.0.47

Hello,
I'm seeking some help with 'AddHandler' and 'Action' methods in Apache
2.x (I've attached my conf file below for reference). In my previous
apache 1.3.x the following config worked fine and now 2.0 is acting up.
I'm mapping a file extension from a particular directory to map to a
specific PHP file.

For example, I was able to do:
  http://SERVER_NAME/images/aph/image_23.bsp
and the server would redirect to the bsp.phtml file contained in that
directory. I was then able to use the 'PATH_INFO' environment variable
to get 'image_23.bsp' to do further processsing.

Now I get 404 file not found pages. I've searched all over the web and
cannot find the solution/answer I'm looking for. The common issue people
mention to me is that 'PATH_INFO' may be the problem. I know that is not
the case because I shouldn't see a 404 in the apache logs. If
'PATH_INFO' was the issue, then the bsp.phtml file would load but have
problems getting the ENV variable.

Your urgent help appreciated,
~jerry

REFERENCE VIRTUAL httpdVirt.conf file
<VirtualHost aaa.bbb.ccc.ddd:80>
	DocumentRoot	/dd-www/htdocs_dd/public_html

	DirectoryIndex	index.phtml index.html
	
	<Directory "/dd-www/htdocs_dd/public_html">
		Options +Indexes FollowSymLinks MultiViews
	
		AllowOverride All

		Order allow,deny
		Allow from all
		
		AddType application/x-httpd-php .phtml .php
		# REMOVED SEVERAL PHP SETTINGS FOR THIS E-MAIL

		RewriteEngine on
		RewriteBase /
		RewriteRule ^getProfile:(.*) /profile/index.phtml?sn=$1
[QSA]
	</Directory>

	# this use to work in apache 1.3.x but not in 2.0
	<Directory "/dd-www/htdocs_dd/public_html/images/aph">
		Action getTest /images/aph/bsp.phtml
		AddHandler getTest .bsp
	</Directory>

	# this works fine
	<Directory "/dd-www/htdocs_dd/public_html/getProfile">
		AddHandler getProfile .+getProfile/(.+)$
		Action getProfile /profile/index.phtml?sn=$1
	</Directory>
	
</VirtualHost>




---------------------------------------------------------------------
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] AddHandler & Action Redirect/Remapping Issues in Apache 2.0.47

Posted by André Malo <nd...@perlig.de>.
* "Jerry P." <ok...@desidesh.com> wrote:

> Nope, this isn't the issue as I mentioned earlier... unless I'm doing
> something wrong.

Uh, sorry. I've seemed to misunderstand your post.

> I added the 'AcceptPathInfo On' param in the Virtual host context (right
> after my 'Directory Index' settings and tested after restarting the
> server. 404 error still exists. The error log says the file:
> /DOCROOT/images/aph/jerry.bsp does not exist.

yep.

> What I expected to happen was that /images/aph/bsp.phtml to have been
> called. If that had worked, then PATH_INFO would have been populated
> with '.../jerry.bsp'.

This doesn't work. And I'm wondering that this really worked in 1.3. If it
does I tend to call it a bug or rather "nasty side effect". Path infos of
directories are not supported.

nd

---------------------------------------------------------------------
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] AddHandler & Action Redirect/Remapping Issues in Apache 2.0.47

Posted by "Jerry P." <ok...@desidesh.com>.
Nope, this isn't the issue as I mentioned earlier... unless I'm doing
something wrong.

I added the 'AcceptPathInfo On' param in the Virtual host context (right
after my 'Directory Index' settings and tested after restarting the
server. 404 error still exists. The error log says the file:
/DOCROOT/images/aph/jerry.bsp does not exist.

What I expected to happen was that /images/aph/bsp.phtml to have been
called. If that had worked, then PATH_INFO would have been populated
with '.../jerry.bsp'.

I also tried putting the 'AcceptPathInfo On' in the directory context.

NOTE: If I do '/images/aph/bsp.phtml/jerry.bsp', then the PATH_INFO
works as listed in the documentation:
http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo.
Unfortunately, that's not what I want unless that is the new
implementation of this directive?
~jerry


-----Original Message-----
From: André Malo [mailto:nd@perlig.de] 
Sent: Sunday, December 07, 2003 1:39 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] AddHandler & Action Redirect/Remapping Issues
in Apache 2.0.47

* "Jerry P." <ok...@desidesh.com> wrote:

> For example, I was able to do:
>   http://SERVER_NAME/images/aph/image_23.bsp
> and the server would redirect to the bsp.phtml file contained in that
> directory. I was then able to use the 'PATH_INFO' environment variable
> to get 'image_23.bsp' to do further processsing.
> 
> Now I get 404 file not found pages. I've searched all over the web and
> cannot find the solution/answer I'm looking for. The common issue
people
> mention to me is that 'PATH_INFO' may be the problem. I know that is
not
> the case because I shouldn't see a 404 in the apache logs. If
> 'PATH_INFO' was the issue, then the bsp.phtml file would load but have
> problems getting the ENV variable.

Yeah, it probably is. In 2.x it was made configurable. Please have a
look at
the AcceptPathInfo directive
(<http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo>).

nd

---------------------------------------------------------------------
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] AddHandler & Action Redirect/Remapping Issues in Apache 2.0.47

Posted by André Malo <nd...@perlig.de>.
* "Jerry P." <ok...@desidesh.com> wrote:

> For example, I was able to do:
>   http://SERVER_NAME/images/aph/image_23.bsp
> and the server would redirect to the bsp.phtml file contained in that
> directory. I was then able to use the 'PATH_INFO' environment variable
> to get 'image_23.bsp' to do further processsing.
> 
> Now I get 404 file not found pages. I've searched all over the web and
> cannot find the solution/answer I'm looking for. The common issue people
> mention to me is that 'PATH_INFO' may be the problem. I know that is not
> the case because I shouldn't see a 404 in the apache logs. If
> 'PATH_INFO' was the issue, then the bsp.phtml file would load but have
> problems getting the ENV variable.

Yeah, it probably is. In 2.x it was made configurable. Please have a look at
the AcceptPathInfo directive
(<http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo>).

nd

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