How to customize the last-modified header in Joomla?

by chasity.halvorson , in category: SEO , 8 months ago

How to customize the last-modified header in Joomla?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer


by delpha , 7 months ago


In Joomla, you can customize the "Last-Modified" header by modifying the PHP code in the template's index.php file. Here's how to do it:

  1. Log in to your Joomla administrator panel.
  2. Go to the "Extensions" menu and click on "Templates".
  3. Click on the "Templates" submenu to see a list of all the templates installed on your Joomla site.
  4. Click on the name of the template you want to modify.
  5. Locate the index.php file for the template and open it in a text editor.
  6. Find the following line of code:
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

  1. Modify the date and time in the line of code to reflect the date and time you want to appear in the "Last-Modified" header.
  2. Save the changes to the index.php file.
  3. Refresh your Joomla website to see the updated "Last-Modified" header.

Note: It's important to keep in mind that modifying the "Last-Modified" header can have a negative impact on search engine optimization (SEO) if it's not done correctly. Before making any changes, it's a good idea to consult with a professional or consult with Joomla documentation to ensure you are following best practices.