UHP2 sites have the capability to be accessed thru a friendly url, similar to Myspace etc. on certain web server configurations.
This is not a function of UHP2 – it is actually achieved by the use of special URL rewriting rules, similar to how SEF url’s are generated.
At the moment only Apache rewriting examples are provided, but our forum has examples of other web server configs.
The UHP2 distribution comes with a sample .htaccess file(htaccess.uhp2.txt) which can be used on Joomla sites with only minor changes.
The .htaccess files should be placed in the Joomla root directory.
The main entries to achieve the effect are shown below:
########## Begin - UHP2 Rewrite rules for www.site.com/username
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ index.php?option=com_uhp2&task=viewpage&username=$1 [L]
########## End - UHP2 Rewrite rules
The example .htaccess files shows the position of these lines in the Joomla .htaccess file. These lines can be inserted in an existing .htaccess or the supplied UHP2 file can be used by renaming it to .htaccess and placing it in the Joomla directory.
Caution
If the UHP2 .htaccess file is used the following line may need to be changed:
#RewriteBase /Joomla
To reflect the location of your Joomla site.
Note
This feature is provided for convenience only, it may not be available or work correctly with your web hosting. It may also be incompatible with other components e.g. SEF. In this case you may not be able to use this facility.