homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
ErrorDocument not working in .htaccess. Where else to look?
being redirected to home page
dpinion




msg:4475428
 4:07 pm on Jul 13, 2012 (gmt 0)

Greetings,
I need some help troubleshooting an issue. (I am guessing) when our site was originally set up it was decided that page not found errors would be sent to the home page instead of an error document. I am wanting to change this and handle it properly. However, the site does not seem to respond to ErrorDocument directive within .htaccess (it is in the / of the site).

Currently I have the following line:

ErrorDocument 404 /404.php

However this is being ignored and users are still being sent to the home page. I have tried looking at headers using plugins, but of course it only returns the 200 OK for the home page that does load.

So where do I go from here? Is there a way to trace this to find out what file has the directive that is forcing people to the home page? Open to suggestions.

 

dpinion




msg:4475441
 4:56 pm on Jul 13, 2012 (gmt 0)

Ok, wanted to follow up to say that I figured it out. This was for a joomla site and I needed to go in and edit /templates/example/error.php as there was the following line:

<?php header("Location: /"); exit; ?>

Just FYI in case someone else needed it.

g1smd




msg:4475460
 6:43 pm on Jul 13, 2012 (gmt 0)

That code was generating a 302 redirect.

Is that how a default Joomla install works?

dpinion




msg:4475467
 6:58 pm on Jul 13, 2012 (gmt 0)

I am not sure actually as I did not originally install the site. I want to say that the home page redirection was done by the company that originally installed the site. I can verify that by looking at a vanilla joomla install.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved