Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5951527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:33:00+00:00 2026-05-22T17:33:00+00:00

I have a website which is www.abrisud.com. This website has 7 domain names (one

  • 0

I have a website which is http://www.abrisud.com. This website has 7 domain names (one for each language): abrisud.com, abrisud.it, abrisud.de, etc… and abrisud-enclosure.co.uk.

The problem is on the last one: I am losing my session on every single request. Each Time I load a page I have a different session ID. On the other domains everything is working just fine.

The website is running ruby 1.8.7 and rails 3.0.0.

I am really convinced that the problem comes from the “-” in the domain name but I just can’t find anything (or almost anything) on the subject through the web.

Hopefully I am being clear enough, if not just tell me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:33:01+00:00Added an answer on May 22, 2026 at 5:33 pm

    Here is the answer :

    From Module ActionDispatch::Http::URL (Rails 3.0.x), be sure to read the comments 😉

    # Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". 
    # You can specify a different <tt>tld_length</tt>, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk".
    def domain(tld_length = 1)
      return nil unless named_host?(host)
    
      host.split('.').last(1 + tld_length).join('.')
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a url which could be www.website.com/order/?pg3=2 or www.website.com/orderstatus/?pg2= There could be several
I have a website which has .htaccess rewrite rules. And alot of them. This
Apologies I am new at this, I have a website which has a CMS
I have a form on my website which forwards the textbox input to www.google.com/search?q=...
I've got a website which has a layout sorta like this: <html xml:lang=en xmlns=http://www.w3.org/1999/xhtml
I currently have a website which has a WebForms 4 site. This website is
I have a PHP5/Zend Framework 1.8.1 web site which is located at: http://www.example.com/foo The
I have a websites www.example.com which is a druapal 6 site. Works well, never
I have a website which has a lot of combo boxes and auto-complete textboxes
I have a website which includes this RSS JavaScript. When I click feed, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.