Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    3

    Question Root/Absolute URL For Internal Links (skin/style editing)

    Hello all,

    I was curious to know if there is some sort of root or absolute URL or variable that can be used when adding internal links inside of a skin.

    For example: if adding a relative URL to FTP accounts via html would look something like
    Code:
    <a href="ftp/accounts.html">FTP Accounts</a>
    Is it possible to have some sort of absolute path for adding such URLs? Example:
    Code:
    <a href="ROOT/ftp/accounts.html">FTP Accounts</a>
    Any help is appreciated.

    Thanks!

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Root/Absolute URL For Internal Links (skin/style editing)

    Absolute URLs will break things with our contemporary security measures because of the presence of /cpsess####...##/ in the URL.

    Are you trying to have something that navigates up a level like ../? What precisely is the issue you are trying to resolve?

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    3

    Default Re: Root/Absolute URL For Internal Links (skin/style editing)

    Hi David,

    Thanks for the reply, basically what I am trying to accommodate is a side panel with an assortment of preferred navigation links. In most cases simply bumping up a level does work, though on a few areas the destination is down multiple levels (../../) which will yield broken links if attempting to access the side panel on those pages.

    I hope that makes sense.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Root/Absolute URL For Internal Links (skin/style editing)

    Usually with web pages you can use something like <a href="/path/to/where/i/want/to/go">link text</a> and starting with / means the path is relative from the domainort you are at. However if you try that in cPanel, you will trigger screens prompting to login again.

    If you are editing a style or theme directly, what you can do is something like:
    <a href="<cpanel MagicRevision="uri("/path/to/where/i/want/to/go")>">link text</a>. This will handle the logic of prefixing any /cpsess###/ to the href if needed.

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    2
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Root/Absolute URL For Internal Links (skin/style editing)

    Hey David,

    I've tried using the above method to link directly to a file, though it seems that the URL ends up as follows:

    Code:
    http://server.domain.com/cPanel_magic_revision_NUMSTRING/frontend/theme/index.html
    For instance, I'm trying to use the following to link to the MySQL page, though it adds the above to the URL, removes the session, and forces me to log-in again.

    Code:
    <a href="<cpanel MagicRevision="uri(sql/index.php)">">MySQL</a>

Similar Threads & Tags
Similar threads

  1. Making plugins -(URL links)
    By tank in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-09-2011, 04:33 PM
  2. 404 Errors on All Internal Links
    By Hines in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-29-2010, 12:08 AM
  3. skin editing issue
    By utropic in forum Themes and Branding
    Replies: 1
    Last Post: 12-10-2007, 11:57 AM
  4. Skin Editing
    By chillh2o in forum Themes and Branding
    Replies: 0
    Last Post: 01-07-2005, 10:31 PM
  5. WHM List Account - Internal Links
    By wapture in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-24-2004, 06:57 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube