HTACCESS custom redirect on 404 error

mysgies

Junior Member
Nov 13, 2006
24
0
0
Dear All,

I am looking to implement custom 404 message. I have a top level .htaccess file which redirect to domain.com\index.php on any 404 error at any level.

I want to change it custom for a particular folder e.g. if any 404 encounter in domain.com\abc it should redirect to domain.com\abc\index.php instead of domain.com\index.php.

Can some one help me what and where I have to put in .htaccess for this modification.

Thanx
Sgies
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
You place the file in the folder in which you want that file to have control. It applies to that folder and all subfolders. So you can have one .htaccess at the root that controls everything, or have specific subfolders override that by placing a specific .htaccess file in those subfolders.