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.

URLs created by EE2 are not correct

October 08, 2011 8:57pm

Subscribe [4]
  • #1 / Oct 08, 2011 8:57pm

    teamadna

    40 posts

    I’ve been troubleshooting issues with a site currently under development and am at a loss.  Any URLs created by EE2 are prepending the site url to the full url.

    for example, the css embeds (using the EE css embed code) when rendered on the site the css path is:

    http://www.siteurl.com/http://www.siteurl.com?css=css/style.v.1318119446

    I’ve checked htaccess, index.php, site configuration in CP…..can’t find what’s wrong.  Any guidance would be welcome.

  • #2 / Oct 08, 2011 9:20pm

    Rob Allen

    3114 posts

    Can you post your template code that you’re using to generate the stylesheet link?

  • #3 / Oct 08, 2011 9:30pm

    teamadna

    40 posts

    <link rel='stylesheet' type='text/css' media='all' href='{stylesheet=css/style}' />
  • #4 / Oct 09, 2011 11:24am

    teamadna

    40 posts

    Should also note that we are using the multi-language alternative described here:

    http://expressionengine.com/wiki/Multi_language_site_alternative/

    this functionality is working fine, however, just the urls generated by EE are incorrect as initially described above.

    We are running v2.2.2 - Build: date 20110801

  • #5 / Oct 10, 2011 12:40am

    John Henry Donovan

    12339 posts

    teamadna,

    if you comment out the following does that affect the generated URL?

    $assign_to_config['site_index'] = 'http://www.example.com/en/';

     

  • #6 / Oct 10, 2011 12:15pm

    teamadna

    40 posts

    Commenting out that line resolves the css embed issue, but now any urls generated by EE don’t include the country path. We are using structure for navigation and now the URLs that it generates are:

    If I’m on the page http://www.sitename.com/en/home

    the url it generates is
    http://www.sitename.com/products
    when it should be be generating
    http://www.sitename.com/en/products

    Before commenting out that line ($assign_to_config[‘site_index’] = ‘http://www.example.com/en/’; in the index.php file located in the en folder) the URLs generated by structure suffered the same fate as the CSS embedded urls, it was creating URLs like: http://www.siteurl.com/http://www.siteurl.com/en/products

  • #7 / Oct 10, 2011 12:23pm

    teamadna

    40 posts

    Update. 

    Your suggestion just got me thinking. By changing the URL in the assign_to_config module to just en I was able to get it working.

    So the working line in index.php in the en folder is now:

    $assign_to_config[‘site_index’] = ‘en/’;

    At first blush this appears to resolve the issue.

  • #8 / Oct 10, 2011 2:20pm

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases