You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Taco Fleur <ta...@nella.net.au> on 2004/01/22 21:15:02 UTC

[users@httpd] Apache and ColdFusion .htaccess status code

I have several files in the search engine, I moved these files, once they
are requested I'd like to return the appropriate status code and do the
redirect, i.e.
.htaccess
redirect permanent /people.cfm http://www.tacofleur.com/index/people/
 
The issue I am having is that apache sends the request (as far as I can
tell) directly to CF, so it does not even check if the file exists etc. and
run the redirect.
In IIS I know there is an option to actually check if the file exists before
sending the request to cf, I know its asking for much, but does Apache have
this?
Or is there some other work-around? If so, how?
 
Taco Fleur
Blog  <http://www.tacofleur.com/index/blog/>
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 
 

Re: [users@httpd] Apache and ColdFusion .htaccess status code

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 23 Jan 2004, Taco Fleur wrote:

> I have several files in the search engine, I moved these files, once they
> are requested I'd like to return the appropriate status code and do the
> redirect, i.e.
> .htaccess
> redirect permanent /people.cfm http://www.tacofleur.com/index/people/
>
> The issue I am having is that apache sends the request (as far as I can
> tell) directly to CF, so it does not even check if the file exists etc. and
> run the redirect.
> In IIS I know there is an option to actually check if the file exists before
> sending the request to cf, I know its asking for much, but does Apache have
> this?
> Or is there some other work-around? If so, how?

You haven't specified exactly how you activate cold-fusion.  There are
some circumstances where apache will call the handler when the file does
not exist.  I agree this doesn't make sense, but there are others who like
this behavior and use it for virtual resources.

For your case, you can probably solve your problem by placing the redirect
in httpd.conf.  .htaccess files are only applied for requests that hit the
filesystem, while httpd.conf should be applied regardless.

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