I found
an earlier thread talking about this. Using that thread, I think I have created a working solution. I need to do more testing to make sure components all still work but it looks good so far. I am using Joomla 1.5.9 with apache on linux, with the three built-in SEO settings all turned on. My solution was:
#1 -- create an .htaccess file inside the /webroot/ with the contents:
Code:
RewriteBase /
## Begin http://www.drichproductions.com/random-knowledge/rewrite-root-directory-subdirectory.php
#
# Add trailing slash if path does not contain a period or end with a slash
RewriteCond %{REQUEST_URI} !(\.|/$)
RewriteRule (.*) http://yoursite.com/$1/ [R=301,L]
#Change http://yoursite.com to http://www.yoursite.com (Optional)
#RewriteCond %{HTTP_HOST} ^yoursite.com$
#RewriteRule ^/?(.*)$ http://www.yoursite.com/$1 [R=301,L]
#### Rewrites http://www.yoursite.com/subdir to http://www.yoursite.com/
## Added this to allow existing files and directories to work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
## Now the rewrite of subdir to rootdir
RewriteCond %{REQUEST_URI} !^/joomla
RewriteRule ^(.*)$ joomla/$1 [L]
#2 -- rename the standard /webroot/joomla/htaccess.txt file to /webroot/joomla/.htaccess file. Change "#RewriteBase /" to "RewriteBase /joomla"
#3 -- In joomla/configuration.php, set $live_site to
Code:
var $live_site = 'http://yoursite.com';
Hope this is helpful.