How to change an addon domain as main domain

If you want to use the current addon domain as the account’s main domain, you can do the following:

  • Back up the account in question before making any changes. Source code   
    1. # /scripts/pkgacct cpanelaccount
  • In the account’s cPanel, remove the addon domain. This will not remove the subdirectory that contains the addon domain’s More >

CodeIgniter: How to remove index.php from URL?

Using .htaccess index.php can be removed. For that you need the following htaccess code segment-

Source code   
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On

# here goes ci path after the main domian, for http://xyz.com/ci or http://localhost/ci (if ci is in the root domain then it needs just a single /)

Source code   
  1. RewriteBase /ci/
  2. RewriteCond %{REQUEST_FILENAME} !-f
  3. RewriteCond %{REQUEST_FILENAME} !-d
  4. RewriteRule ^(.*)$ index.php/$1 [L]
  5. </IfModule>
More >