James Hornitzky
James Hornitzky

Reputation: 174

How to stop Joomla 2.5 Redirect plugin catching 404 URLs

Im using the redirect manager in a Joomla 2.5 and it works great. Only issue is that at some point I want to stop the redirect manager from catching the 404 urls and adding them to the backend.

How is this done? Is there a configuration option in the backend or do I need to hak the redirect plugin code? And if so how do I do it?

Upvotes: 0

Views: 666

Answers (1)

James Hornitzky
James Hornitzky

Reputation: 174

Ive worked out the code way to do it, but Id prefer a backend config way.

Code fix - inside plugins/system/redirect/redirect.php comment out the following lines:

// If not, add the new url to the database.
                 $query = $db->getQuery(true);
                 $query->insert($db->quoteName('#__redirect_links'), false);
                 $columns = array( $db->quoteName('old_url'),
                                $db->quoteName('new_url'),
                                $db->quoteName('referer'),
                                $db->quoteName('comment'),
                                $db->quoteName('hits'),
                                $db->quoteName('published'),
                                $db->quoteName('created_date')
                            );
                $query->columns($columns);
                $query->values($db->Quote($current). ', '. $db->Quote('').
                            ' ,'.$db->Quote($referer).', '.$db->Quote('').',1,0, '.
                              $db->Quote(JFactory::getDate()->toSql())
                            );

                $db->setQuery($query);
                $db->query();

Upvotes: 1

Related Questions