impresspages Main Home URL ipHomeUrl( )

564 Views Asked by At

i try to get the main url of my web site by using function of

ipHomeUrl();

The issue is this function bring also the path of languages even it was left , function bring auto the current languages path

is like that :

http://localhost/wesitename/fr/  

what i want is get only :

http://localhost/wesitename/
2

There are 2 best solutions below

0
On BEST ANSWER

If you want to get an URL to the website root, you can use:

ipConfig()->baseUrl()

It should work in a more correct way than cached URL

1
On

i found the solution , this function will be useful for add link of admin page .

$baseUrl = ipStorage()->get('Ip', 'cachedBaseUrl');

echo ('<div class="AdminSide" > <a href="'.$baseUrl.'admin/">Admin Page</a>  |  <a href="'.$baseUrl.'webmail/"> WebMail</a></div>');