You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <jo...@slive.ca> on 2007/04/27 15:18:10 UTC
Re: [users@httpd] internal rewrite puzzle
On 4/27/07, Eric S. Johansson <es...@harvee.org> wrote:
> I'm trying to hide a cgi url behind a pretty one. from what I've found in the
> archives, it may or may not be possible.
>
> my rules are very simple and they satisfy my first requirement
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule /(.*) /cgi-bin/akasha.cgi
>
> and yes, I am redirecting to the cgi if a file does not exist for the given uri.
> the 404 handler does not work since it appears to lose all form data.
>
> The problem is that the rules reveal the rewritten url. looking at the wire
> level traffic, I see that the response contains a Location header with the
> rewritten url. injecting a new location header causes apache to fail with some
> sort of internal redirection error. I'll reconstruct if it seems important.
>
> any ideas on how to fix this problem?
Try replacing /cgi-bin/akasha.cgi with the full file-system path to
the cgi (ie /usr/local/apache2/cgi-bin/akasha.cgi). This will avoid
conflicts with mod_alias and prevent some possible redirect loops.
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
[users@httpd] Re: internal rewrite puzzle
Posted by "Eric S. Johansson" <es...@harvee.org>.
Joshua Slive wrote:
> Try replacing /cgi-bin/akasha.cgi with the full file-system path to
> the cgi (ie /usr/local/apache2/cgi-bin/akasha.cgi). This will avoid
> conflicts with mod_alias and prevent some possible redirect loops.
it was not the solution but it lead me to one. I consider this a win! thanks
for the much appreciated help.
---------------------------------------------------------------------
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