Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Since HostBill 2.4.5 all URLs in clientarea are by default SEO-friendly. Some example clientarea links: Code:

Knowledgebase article:
Code Block
languagetext
http://my.hostbillapp.com/index.php?/knowledgebase/article/20/my-article-title/
Order page:
Code Block
languagetext
 http://my.hostbillapp.com/index.php?/cart/shared-hosting/
Clientarea:
Code Block
languagetext
 http://my.hostbillapp.com/index.php?/clientarea/

Customizing SEO URLs

In /includes/config.php file you can find configuration variable: $ca_url_prefix, which can take following values:

Code Block
languagetext
 $ca_url_prefix="index.php?/"; //will result in urls like:
 http://my.hostbillapp.com/index.php?/clientarea/
Code Block
languagetext
 $ca_url_prefix="?/"; //will result in urls like:
 http://my.hostbillapp.com/?/clientarea/

In order to completely remove index.php and ? part use following configuration:

  • /includes/config.php
Code Block
languagetext
 $ca_url_prefix="/"; 

Create .htaccess file:

Code Block
languagetext
 ## EXAMPLE .htaccess file for  SEO Urls - note mod_rewrite needs to be enabled in your Apache
  <IfModule mod_rewrite.c>
    RewriteEngine On
    #Modify RewriteBase if your HostBill is placed in a virtual host directory
    RewriteBase /
    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteRule ^downloads/?$ ?cmd=downloads [NC,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

Which will result in URLs like

Code Block
languagetext
 http://my.hostbillapp.com/cart/shared-hosting/

...

Please refer to Security & Display