NOTE: Most of these instructions came from here, "Giving Wordpress its Own Directory".
If it is Wordpress specifically, this can be handled by adding an index.php that looks like this to the directory you want to be the base:
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./blog2/wp-blog-header.php');
?>
In Wordpress settings, you need to let it know the difference between the "actual" Wordpress URL and the one you want everyone else to use:
(These were under "Settings" for me...)
Also, I cannot remember if this is done automatically or not (I thought it was), but the .htaccess where you put the index.php file will need to look like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress