Reputation: 1849
I recently just launched an ExpressionEngine site and one of the last steps I take is removing index.php from the URL. In the case of this site, the default template group is called "site". Long story short, after removing index.php from the URL, all pages continue to work great with the exception of my contact page, which also lives in the "site" template group. Going to http://example.com/contact/ gives me a 404 while going to http://example.com/site/contact produces the desired result. In past ExpressionEngine site setups (including my own) this has never happened, so does anyone have thoughts on why this might not be working?
Upvotes: 1
Views: 894
Reputation: 563
Andrew, this is possibly because of Strict URLs, too. Strict URLs in the template preferences mean that the default template group (in your case, "site") no longer resolves without the need of appending it the template group name (only exception is /index).
Jesse's solution works. In the past I've used Brandon's redirect tomfoolery here: http://pixelandtonic.com/blog/making-pt-structure
Upvotes: 4
Reputation: 6679
The first URL segment always maps to the template group. When there isn't a first URL segment, ExpressionEngine automatically loads the index
template in your default template group.
Now, you're getting the 404 because you don't have a contact
template group. You can do one of two things here:
Move your site/contact
template to contact/index
Redirect /contact
to /site/contact
using .htaccess
or Detour Pro.
Upvotes: 4