You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Aidan Whitehall <Ai...@Fairbanks.co.uk> on 2003/06/24 15:20:44 UTC

[users@httpd] Equivalent of IIS custom 404

Our web site is on a box that's running IIS 5.0. I wanted users to be
able to enter easy-to-remember urls and redirect the browser
appropriately, as on the Macromedia web site.

To do this, I added a custom 404 in the /go/ folder which redirects any
404 responses to /go/index.cfm. That file checks the end of the url and
redirects the browser from this:
 http://www.fairbanks.co.uk/go/casestudies
to the less memorable:
 
http://www.fairbanks.co.uk/services/index.cfm?section=casestudy&text=stu
dy01

On the development machine, I've started running Apache and wanted to
mimic this behaviour. I added this directive

<Directory "pathToWebRoot\go">
    ErrorDocument 404 /go/index.cfm
</Directory>

but that redirects http://localhost/go/casestudies to http://localhost/

Can anyone please let me know how to mimic the IIS Custom 404
functionality in Apache? Thanks!


-- 
Aidan Whitehall <ma...@fairbanks.co.uk>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd  +44 (0)1695 51775
Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

---------------------------------------------------------------------
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] Equivalent of IIS custom 404

Posted by Robert Andersson <ro...@profundis.nu>.
Aidan Whitehall wrote:
> On the development machine, I've started running Apache and wanted
> to mimic this behaviour. I added this directive
>
> <Directory "pathToWebRoot\go">
>     ErrorDocument 404 /go/index.cfm
> </Directory>
>
> but that redirects http://localhost/go/casestudies to http://localhost/

I cannot catch anything wrong with that, and should work. Are anything there
aliases, symlinks etc? Can you get any clues from the access/error log? Do
you see /go/index.cfm being requested?

> Can anyone please let me know how to mimic the IIS Custom 404
> functionality in Apache? Thanks!

Although I'm not very familiar with IIS, all you should have to do is to add
the ErrorDocument directive in proper context (as you simingly have done).

Regards,
Robert Andersson


---------------------------------------------------------------------
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] Equivalent of IIS custom 404

Posted by Jeff Cohen <su...@gej-it.com>.
I see some really strange misspelling in your directives, just wanted to
make sure it's not set the way you typed it, you typed it:
<Directory "pathToWebRoot\go">
    ErrorDocument 404 /go/index.cfm
</Directory>

Which should be:
<Directory "pathToWebRoot/go">
    ErrorDocument 404 index.cfm
</Directory>

All the best,
Jeff Cohen
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!



> -----Original Message-----
> From: Aidan Whitehall [mailto:AidanWhitehall@Fairbanks.co.uk]
> Sent: Tuesday, June 24, 2003 9:21 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Equivalent of IIS custom 404
> 
> Our web site is on a box that's running IIS 5.0. I wanted users to be
> able to enter easy-to-remember urls and redirect the browser
> appropriately, as on the Macromedia web site.
> 
> To do this, I added a custom 404 in the /go/ folder which redirects any
> 404 responses to /go/index.cfm. That file checks the end of the url and
> redirects the browser from this:
>  http://www.fairbanks.co.uk/go/casestudies
> to the less memorable:
> 
> http://www.fairbanks.co.uk/services/index.cfm?section=casestudy&text=stu
> dy01
> 
> On the development machine, I've started running Apache and wanted to
> mimic this behaviour. I added this directive
> 
> <Directory "pathToWebRoot\go">
>     ErrorDocument 404 /go/index.cfm
> </Directory>
> 
> but that redirects http://localhost/go/casestudies to http://localhost/
> 
> Can anyone please let me know how to mimic the IIS Custom 404
> functionality in Apache? Thanks!
> 
> 
> --
> Aidan Whitehall <ma...@fairbanks.co.uk>
> Macromedia ColdFusion Developer
> Fairbanks Environmental Ltd  +44 (0)1695 51775
> Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>
> 
> ___________________________________________________________________
> _____
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ___________________________________________________________________
> _____
> 
> ---------------------------------------------------------------------
> 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