Joomla
How to redirect your-site.com to www.your-site.com
Enter this code in your .htaccess file after the
RewriteEngine On line:
RewriteCond %{HTTP_HOST} ^your-site\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?blablabla\.bg[NC]
RewriteRule (.*) http://www.your-site.com/$1 [L,R=301]
Redirect 301 /home http://www.your-site.com/
How to create a 404 redirect page in Joomla
Copy the error.php file from your-site/templates/system to your template main directory.
Then just open the error.php file from your Joomla template and edit it.
If you want to redirect to a sitemap on your site for example use this code at the top of the error.php file before everything in the file write:
<?php
defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
if (($this->error->code) == ‘404′) {
header(’Location: http://www.yoursite.com/sitemap’);
exit;
}
?>
How to get page title for Joomla 1.5
This is the code:
<?php $mydoc =& JFactory::getDocument(); $mytitle = $mydoc->getTitle(); ?>
How to style the Joomla search module and component?
If you want to change the look of the Joomla search module and Joomla search component:
Copy the file:
/components/com_search/views/search/tmpl/default.php
to
/templates/my_template/html/com_search/search/default.php
Now make a few changes in that file and refresh your site.
In a similar fashion, you can also override the Search Module layout file. Copy the file:
/modules/mod_search/tmpl/default.php
to
/templates/my_template/html/mod_search/default.php