Joomla's redirect component is incredibly helpful if you happen to be
redesigning your Web site;
if you have an existing Web site that you've built in Dreamweaver, or FrontPage,
or maybe you have it in some other content management system, it's in
WordPress, it's in Drupal, and you want to move it out of those systems, and put it into Joomla.
Anytime you move from one system to another, the URLs for your Web site are going to change,
and what that means is, if somebody goes to Google shortly after you launch
your site, and then type in a URL, or they search for a page, Google may pull up
an old page of yours.
And that old page, when they click on the link to visit it, they are going to
come up with a 404 error; that's that page not found kind of error.
This particular Web site we've been working on is a new design, so those 404
errors are less likely to occur from that type of thing,
but it's still possible that somebody might just be trying to type things into
the Web site, and see if they pull up pages, or somebody may mistype a URL, or the
marketing department may come to you and say, hey, we are going to run a
campaign, and we'd like to tie it to this particular short URL that we're going
to run in our marketing materials.
We'd like you to set that up to direct to an existing page on the Web site;
maybe something that has a longer URL.
So, fortunately Joomla
has a way of dealing with this through the redirect component.
So let's say that, for example, I go here on my About page, and I am wondering if
there is a solar page, so I say localhost/index.php/solar, and I hit Return.
What happens is I get this 404 page.
And this is Joomla's 404 page. It indicates that the page cannot be found, and
there may be some reasons for that.
This 404 page allows me to click on this link to go back to the homepage, which
actually looks like a bug inside of Joomla!
When I click on this, I am actually loading this page over and over again, so
that doesn't quite work, but it's a lovely idea to have that link there.
What has happened, though, is that Joomla's redirect component has indeed tracked this down.
So if we go to the back-end of Joomla,
and we go to Components, and we go to the Redirect component, we'll notice that
I've actually got two URLs here that have turned up as 404 errors.
One is a delete me page. I used this earlier in some videos, and when I refresh
the page after I had deleted that page from the back-end of Joomla, I wound up
getting a 404 error. The Redirect component recorded that for me.
Also, this thing that I just typed in, index.php/solar,
I have generated a 404 error for that as well. So Joomla
is tracking these for me, and that's very nice of Joomla.
But it's just telling me what pages have not been found.
What I can do, though, is I can say, when somebody types in the solar, just like
that, I'd like to send them to the solar blog.
So something I can do is click on this particular link.
So what happens is when it says the source URL is this, what I just typed in in
my Web browser, what is the destination URL?
Well, my destination URL is going to be the solar blog.
So I am just going to copy this URL from here, Ctrl+C or Command+C to copy that,
and Ctrl+V or Command+V to paste that in.
It could be that somebody wanted this URL solar on the end, maybe that was a
marketing campaign, so we can say New marketing brochure for solar panels.
The comment isn't required, but it's nice to remember why it was that you created
this URL in the first place.
And then, of course, the Status of this particular redirect is either Disabled, or
it's Enabled, Archived, or Trashed, so I am going to say Enable it, and then I am
going to say Save & Close.
So now what will happen is, the next time somebody happens to go to this
solar page, local host/index.php/solar, they will be automatically redirected
to the solar blog page.
So I can create these redirect pages proactively. In other words, marketing comes
to me and says, make this redirect and point it to this page on the Web site. Or I
can do these reactively, so as people come to my site, and 404 pages are
generated, I can respond to that by directing those links to a page that does
exist on the Web site.