Apache – ModRewrite – redirect site to a subfolder

If you want to redirect your website to a subfolder you can edit (or create) the root file .htaccess using Apache ModRewrite

You can insert the following code:

This method is useful also to create different installation (and version) of your website in different folders. You can edit then .htaccess file to redirect to one or another installation.


Joomla: get Objects (database, user, application)

Here below the code to programmatically obtain:

Access to Database Object

Access to User Object:

Access to App Object:

Access to Document Object:



Joomla: get UserGroupId by name programmatically

You can obtain Joomla UserGroup id by name with the following code:



Joomla: redirect user to Login programmatically

If you want your component function to be accessed by your user prior to login programmatically you can use the following code:

You can include the function in your helper class


You can call the function in your MVC code with the following instructions: