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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:13:39+00:00 2026-05-15T15:13:39+00:00

I use lunarpages for my hosting, and can have multiple websites added on. When

  • 0

I use lunarpages for my hosting, and can have multiple websites added on. When I add a new website, it creates a directory in where my current site exists

ie my site is jeffkilroy.com, if I make a domain for hello.com, it now also exists at jeffkilroy.com/hello

This is fine except I would like to organize it a bit better so that the site directories don’t mix with my jeffkilroy.com files

If I put all my jeffkilroy.com site files in something called “main”, Is it possible to put something in htaccess where:

jeffkilroy.com/home really goes to jeffkilroy.com/main/home

but still be able to easily access my stuff from the root (other sites):
jeffkilroy.com/hello

  • 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-15T15:13:39+00:00Added an answer on May 15, 2026 at 3:13 pm

    This solution is entirely dependent on you not having folders in your root (for the other sites) that are named the same as folders in your main site, but since you still want to be able to access the other sites’ folders from the root, there’s not much way around that.

    Anyway, this seems to work:

    RewriteEngine On
    
    # Let's prevent them from being able to go to our /main path manually
    RewriteCond %{THE_REQUEST}       ^(POST|GET)\s/main
    RewriteRule ^main/?(.*)$ http://jeffkilroy.com/$1 [R,L]
    
    # Redirect stuff to /main/ if it isn't pointing to something else, or
    # if it's just pointing to the primary root
    RewriteCond %{REQUEST_URI}       ^/$
    RewriteRule ^.*$ /main/$0
    
    RewriteCond %{REQUEST_URI}      !-f
    RewriteCond /main%{REQUEST_URI}  -f
    RewriteRule ^.*$ /main/$0
    
    RewriteCond %{REQUEST_URI}      !-d
    RewriteCond /main%{REQUEST_URI}  -d
    RewriteRule ^.*$ /main/$0 [L]
    

    Side note for the curious: It would be nice to be able to condense the RewriteCond statements by using the [OR] flag, but there is no operator precedence, so it’s just evaluated top-to-bottom, which wouldn’t work here.

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

Sidebar

Related Questions

Use Case: I have some repo on GitHub, someone forked it and added new
use PHP and MySQL. Want my website to have the feature of image uploading
Background: I'm new to CakePHP. I have a small test site (mostly composted of
use Text::Table; my $tb = Text::Table->new(Planet,Radius\nkm,Density\ng/cm^3); $tb->load( [ Mercury,2360,3.7], [ Mercury,2360,3.7], [ Mercury,2360,3.7], );
use LWP::UserAgent; use Data::Dumper; my $ua = new LWP::UserAgent; $ua->agent(AgentName/0.1 . $ua->agent); my $req
Use Elixir and have two entities -- Voter and Candidate -- with many to
use javascript or other method ? have any recommendation?
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
Use scenario is pretty simple: I have a desktop only application that could be
Use case is to have a server connect to thousands of users email accounts

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.