ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

site_url is incorrect

May 17, 2012 8:23pm

Subscribe [3]
  • #1 / May 17, 2012 8:23pm

    imagineer

    8 posts

    When I use the tag site_url it should always point to the url I have entered in general config. However Im using a shared SSL, which redirects customers to certain pages like https://secure4.securedomain.com/mydomain_prefix/somepage
    In which case, any items using {site_url} are replaced with https://secure4.securedomain.com/

    example:

    <link href="http://mydomain.com/css/styles.css" rel="stylesheet" type="text/css" />

    comes out as :

    <link href="https://secure4.securedomain.com/css/styles.css" rel="stylesheet" type="text/css" />
  • #2 / May 18, 2012 9:29am

    jcowen

    66 posts

    How about if you create a global variable called {gv_site_url} (I’m guessing EE won’t let you create one called site_url). Put your site url in here and call it with this tag which is never going to get changed?

    Or if you can get away with it - just use relative file paths such as

    <a href="/template/page">

    which is what I tend to do and then not need the site_url anyway.

    Hope one of those might work for you anyway?

    Cheers
    -john

  • #3 / May 18, 2012 4:57pm

    Shane Eckert

    7174 posts

    Hey imagineer,

    You are right, that is the expected behavior.

    I like mekonta’s suggestion. That should work quite nicely, just remember snippets will not work with GV’s.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases