Configuring Mambo's Search Engine Friendly URLs on phpnet.org

Submitted by Frederic Marand on

PHPnet.org is a non-profit hosting association for PHP developers. Due to their hosting parameters, Mambo's "Search Engine Friendly URLs" won't work out of the box. Here is how to set up the .htaccess for Mambo CMS/Joomla on these hosts.

Using the default parameters, Mambo or Joomla set up on a PHPnet.org hosting only allows access to the front page. Any other URL returns You are not authorized to view this resource. You need to login.

Guided by a previous post on the 4.5.1 forum at mamboserver and additional info gleaned here and there, I found how the .htaccess has to be set up on this shared hosting provider. Without these changes, I had the same errors as other users on other hosting solutions.

On PHPnet.org, the .htaccess *must* be renamed htaccess.fi instead of .htaccess. Additional clauses have to be added as follows.

For a domain, say, www.example.com :

Options +FollowSymlinks
RewriteEngine On
RewriteBase /home/users/e/example/www
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php

Where:

  • e is the first letter of the domain left part
  • example is the domain left part
  • www is the subdomain

The rewrite rule needs the / before index.php.

Tagged for , , , and in Technorati.

I've had my site up and running for a little while now and have not been able to figure out for the life of me how to get the URL rewrite rule to work on siteground.com's hosting- and of course, Mambo doesn't really help out all that much, it just says to rename the htaccess.txt to .htaccess (which the fantastico! installer does for you). Well, after a little searching, I stumbled across your post. Thank-you! I love it when the additional content is short, sweet and to the point and the code is spot on. In that vein, I'll post a quick snippet for how to get the rewrite to work on siteground:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /home/[SITE 8 LETTER LOGIN]/www
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php