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 6091865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:22:38+00:00 2026-05-23T12:22:38+00:00

I am developing a website using Codeigniter that will have different subdomains for different

  • 0

I am developing a website using Codeigniter that will have different subdomains for different US cities, like Boston.mysite.com, NYC.mysite.com, Philadelphia.mysite.com just like Groupon, Yelp etc. However have never done this before and do not know how to achieve this! Assume my site currently mashes all the cities together but now I want to seperate them into different cities.

Question 1: How do I seperate my website into different cities, each with its own subdomain?

Question 2: Do I have need to duplicate my controllers, views, models for the different cities? What about the database? At this point I dont think there will be any difference in the site for the different cities except the database will not be shared among the different cities

Question 3: Is using IP address a good way to find out which city a user is in so as to redirect the user to the different subdomains?

  • 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-23T12:22:38+00:00Added an answer on May 23, 2026 at 12:22 pm

    CodeIgniter subdomains are just folders parallel to the www folder in the site folder.

    Example: /site/boston/htdocs

    They could certainly all share the same database, as the database config is in the application/config and you could have the system folder setup for shared resources across all subdomains. You will still need to setup all the subdomains vhosts in apache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing a login library for a website using CodeIgniter. The authentication
I am developing a website using CodeIgniter and PHP. Some of my friends suggest
I'm developing a 3-column website using a layout like this: <div id='left' style='left: 0;
CONTEXT: I'm currently developing a website that will involve Credit Card numbers handling. Confidential
I am developing a website using SQL Server Express on my development machine. My
I'm developing a website (using asp.net by the way) and I'm having a problem
I've been developing a simple website using asp.net MVC and I'm starting to add
I'm developing a website. I'm using a single-page web-app style, so all of the
I am developing a website that relies much on XML data. The web site
Hello everyone, I'm developing a photo sharing web site using the CodeIgniter PHP framework

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.