Trouble installing on cpanel with subdomain

Hi All,

Hello from Australia.

I am trying to install invoice plane on my cpanel account under a subdomain.
The URL is a2bremovals.leapingfoxmm.com.au
The files have been uploaded into the correct folder but when I go to the website link it redirects to an IP address and displays an error.
I have setup the htaccess file within the Invoice Plane root folder as shown on the wiki but it doesn’t seem to make any difference.

I would be appreciative of any ideas.

Kind Regards,

Pat

This is the htaccess file…

## Run InvoicePlane in a subfolder
## If you are using a subfolder please remove the hash in front of the line ‘#RewriteBase /subfolder’
## and replace ‘subfolder’ with the actual name of your folder, i.e. ‘RewriteBase /invoices’

<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /a2bremovals
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  
  ## Remove the hash in front of the following two lines if you want to force HTTPS
  #RewriteCond %{HTTPS} off
  #RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
  
</IfModule>

You’re confusing “subdomain” with “subfolder”.

You want something like:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://a2bremovals.leapingfoxmm.com.au/$1 [R,L]
#RewriteBase /subfolder
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

And possibly check out your config.php and index.php

Hi thanks so much for your reply.

I have tried to access the website using the subfolder as well with the same result.
www.leapingfoxmm.com.au/a2bremovals

I will try the changes to the htaccess soon and see how it goes. Thanks for the suggestion :slight_smile:

The .htaccess file has nothing to do with the subdomain and you should not modify the file unless you have to.

If the URL redirects you to the IP you may have missed to set the URL in the index.php file which is necessary for a proper URL handling.

Hi Kovah,

I haven’t yet been given the option of setting one. Every time I go to index.php I get the same error.
Is it possible to set it manually in a configuration file?

Yes you have to set it manually in the index.php file as the current system is not capable of determining the URL correctly.

Hi, I have managed to get it to work.
I had to remove all files and re-upload the zipped installation.
Thanks for your help guys :slight_smile: