We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

404 Page showing instead of Homepage

How Do I?

blackline's avatar
blackline
3 posts
10 years ago
blackline's avatar blackline

So my 404 page is showing up instead of my default template group which is set as sites home page. I have removed all the code to ensure it’s not any bad markup code.

If I go to qa.domain.com it shows the 404 page, if I go to qa.domain.com/home it pulls up the default homepage as it should.

I have enabled / disabled strict urls, I have removed my .htaccess and re-coded it from start. I don’t know why my 404 page is only showing up for my home page. All the other pages I can browse to from nav just fine.

If I create a new template group and set that as the default site homepage, it still displays the 404 template.

Any thoughts / ideas would be helpful…

Thanks

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
10 years ago
Robin Sowell's avatar Robin Sowell

Odd one- is it still giving you trouble? I’d take out the htaccess while debugging. And triple check that the ‘home’ group is set as your default. Then I’d see if it comes up with just index.php in there- i.e., qa.domain.com/index.php.

I also find it really useful to turn template debugging and output profiling on. In 2.x, that’s ‘Admin- System Admin- Output and Debug’. You can see what EE thinks the template should be and why. For example, you can see how it’s parsing the url and the actual query used to go fetch the template:

SELECT `exp_templates`.*, `exp_template_groups`.`group_name`
FROM (`exp_templates`)
JOIN `exp_template_groups` ON `exp_template_groups`.`group_id` = `exp_templates`.`group_id`
WHERE `exp_template_groups`.`site_id` =  '1'
AND `exp_templates`.`template_name` =  'index'
AND `exp_template_groups`.`is_site_default` =  'y'
#APP/libraries/Template.php L:2389  EE_Template::fetch_template()

That’s often enough of a hint to spot what’s going on.

       
blackline's avatar
blackline
3 posts
10 years ago
blackline's avatar blackline

Yep still have the issue. I have “home” set as my Default Group with that only thing in that group is an index page. I even created a new group called “new” with a new index page with very basic html structure and it still defaults to my 404 group.

I have removed the .htaccess file.

Thanks for the debugging suggestion I’ll look through that and see. If not I’ll blow out my QA instance and start from scratch a rebuild is about to start anyways…

Thanks for the suggestions!

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
10 years ago
Robin Sowell's avatar Robin Sowell

It’s got to be something both quirky and simple. Watch out for the existence of an index.html/index.htm type file too. Those will load as default in most cases. But- shouldn’t 404.

Hopefully you’ll spot it quickly once you look at the debug.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.