At the time when I made this post, I needed a quick CMS solution and really didn’t have months to work out the kinks w/ GoDaddy’s ModX install. If I were attempting this again I would either:
1) Not use GoDaddy’s automated install, and instead install ModX myself in the root folder of my web... or
2) Use Mod_Rewrite to solve the problem assuming all pages on the site use ModX.
The first option should be self explanatory. The second option would involve setting up basically 2 Mod_Rewrite Rules in the .htacces folder in the root of your web. At the time I made the original post, I didn’t have 2 months to learn all the intricate details of Mod_Rewrite or to debug the problem, so I went w/ WordPress instead. I could stumble through the Mod_Rewrite solution now.
Essentially, if a browser/crawler (user agent) requests a URL on my site (example.com) and the URL requested was of the form example.com/modx/blah... then I would 301 redirect the request to example.com/blah using a Mod_Rewrite RewriteRule/RewriteCond. Then when the user agent requested the example.com/blah URL I would simply URL rewrite it (without a redirect) BACK TO example.com/modx/blah. This would leave the nice clean URL example.com/blah in the browser address bar while behind the scenes the server would secretly serve up example.com/modx/blah and return a 200 status. Crawlers would think the content received was generated by example.com/blah even though it really came from example.com/modx/blah.
I haven’t tested the rules, but off the top of my head I believe the Mod_Rewrite rules that would need to be placed in the .htaccess file in the root folder of your web would likely look something like:
RewriteEngine on
RewriteBase /
# Check first to see if it included modx and if so 301 redirect w/out modx
RewriteCond $1 modx/(.*) [NC]
RewriteRule (.*) http://www.example.com/%1 [R=301,L]
# if get this far then page in URL does NOT start w/ modx so URL rewrite
RewriteRule (.*) http://www.example.com/modx/$1 [L]
The above assumes that you prefer to use the www version of your URL as their canonical form. If you prefer the non-www version of your URLs then you would simply modify it to remove the www.
RewriteEngine on
RewriteBase /
# Check first to see if it included modx and if so 301 redirect w/out modx
RewriteCond $1 modx/(.*) [NC]
RewriteRule (.*) http://example.com/%1 [R=301,L]
# if get this far then page in URL does NOT start w/ modx so URL rewrite
RewriteRule (.*) http://example.com/modx/$1 [L]