Book Image

Building Websites with ExpressionEngine 2

By : Leonard Murphy
Book Image

Building Websites with ExpressionEngine 2

By: Leonard Murphy

Overview of this book

<p>ExpressionEngine is a flexible, feature-rich content management system used by top designers and web professionals across the world to build and manage their websites. It is written in the world's most popular web scripting language, PHP, and built on the MySQL database server. Are you eager to start creating websites with ExpressionEngine?<br /><br />Written for ExpressionEngine version 2.1 and later, this book will give you clear, concise, and practical guidance to take you from the basics of setting up ExpressionEngine to developing the skills you need to create ExpressionEngine websites to be reckoned with.<br /><br />You will begin with setting up a basic installation of ExpressionEngine. You will then learn how it works, before learning how to create and manage your website in ExpressionEngine. As you progress further into the book you will learn how to build an events calendar and how to build a photo gallery and before you know it, visitors to your website will be able to post comments, search your content, sign-up for a mailing list, and even send their friends an e-mail. As you consider the benefits of buying this book, you will learn how to manage members and member groups, how to optimize your website and avoid repetition, how to remove the index.php file for cleaner URLs, and how to take backups. At the end of the book, you will learn how to update ExpressionEngine to its latest version.</p>
Table of Contents (17 chapters)
Building Websites with ExpressionEngine 2
Credits
About the Author
About the Reviewers
Preface
Solutions to Exercises

Improving your 404 Page


In the last chapter, you created a 404 Page for your site. ExpressionEngine allows for great flexibility with URLs and the downside of that is that invalid URLs can often return valid content.

As an example, if you type in an entry URL that does not exist (such as http://localhost/faqs/browse/ihatetoast, you see an actual page with content instead of your 404 template. This can be confusing to visitors if they mistype the URL. Luckily, there are options available to fix this.

ExpressionEngine comes with a redirect tag that you can use to redirect visitors to another template, based on a conditional. Typically, the syntax of this tag would be {redirect="template_group/template"}. However, when redirecting to a 404 Page, rather than redirecting to "includes/404", you can redirect to "404". This will return the template that you defined in Chapter 4 as your 404 template (if you have not yet defined this template, you can do so in Design | Templates | Global Preferences...