Dumb question, but I can’t seem to find an answer. Perhaps I’m phrasing it incorrectly.
The page I want is at "mydomain.com/modx/" and all of the content is in a template.
How do I get this page on to my top domain so that when "mydomain.com" is called, it goes straight to that page.
I’m thinking I could redirect my domain to "/modx", but there has to be an easier way. Do I need to move the modx installation to the top domain "mysite.com/"?
Where should I look?
Thanks for your input.
-Chase
Did you ever resolve this?
One simple way would be to locate and open the htaccess file in your root directory, and change the last RedirectRule like so:
from this
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
to this
RewriteRule ^(.*)$ http://your-domain.com/modx/index.php?q=$1 [L,QSA]
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
Well it appears as though you’re missing the query string at the end of this line:
RewriteRule ^(.*)$ http://chasenow.co.uk/modx/ [L,QSA]
which should look like this:
RewriteRule ^(.*)$ http://chasenow.co.uk/modx/index.php?q=$1 [L,QSA]
... although I’m not entirely sure if it will make a difference. Worth trying though. Let us know.
Mike
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
I’m here with the same exact question, after 2 days of searching.
I never would have installed MODx 2.0 into a subdir in the first place, except for warnings about unspecified security concerns when installing into the root.
The suggestion to rewrite the URL using .htaccess just doesn’t...feel...right. That’s backwards, isn’t it? MODx just needs to shift gears and create pages in another directory, right? I mean, when you move, you don’t expect the Post Office to forward your mail from the wrong address to the right one for all eternity...you know the new address, so you just start using it.
With all of the SEO and performance concerns surrounding redirects, as well as the potential .htaccess pitfalls such as loops, chains, and RegEx errors...isn’t it reasonable to expect that MODx might know where it is in relationship to the server root, and handle its own paths accordingly?
Quote from: SchwingBlade at Sep 22, 2010, 08:50 PM
The suggestion to rewrite the URL using .htaccess just doesn’t...feel...right. That’s backwards, isn’t it? MODx just needs to shift gears and create pages in another directory, right? I mean, when you move, you don’t expect the Post Office to forward your mail from the wrong address to the right one for all eternity...you know the new address, so you just start using it.
With all of the SEO and performance concerns surrounding redirects, as well as the potential .htaccess pitfalls such as loops, chains, and RegEx errors...isn’t it reasonable to expect that MODx might know where it is in relationship to the server root, and handle its own paths accordingly?
Revo makes it possible to easily migrate the core directory to anywhere within the server filesystem - but the collateral directories (assets, manager, connectors, etc.) should remain in the web root. The intention is to only allow direct script access to the core directory by moving it outside the web root (as well as potentially changing the core folder name to obfuscate it).
I wouldn’t know how MODx would be able to guess the location of a relocated core directory. Hardcoding the path in config files, though, isn’t a terrible inconvenience, and in fact kind of gives me peace of mind that the path will always be correct and hackable-less by a tainted server variable or something other.
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
It seems we are missing the point of the original question (or I’m missing the point of this thread

):
how can modx be installed in a subdirectory without that subdirectory displaying in the URL of the browser ie top level domain only.
Modx is installed in
www.top-level-domain.com/subdirectory/
The goal is to access
modx via www.top-level-domain.com
AND to never display the subdirectory that modx is installed in, so all URL’s appear to be coming from root directory eg
www.top-level-domain.com/index.php?id=1 would normally look like
www.top-level-domain.com/subdirectory/index.php?id=1
Here is .htaccess code I’m using to hide the subfolder from the URL:
#htaccess file located in root folder
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteRule ^(.*)$ subdirectory/$1 [L]
found here:
http://forums.site5.com/showpost.php?p=143837&postcount=4
This works for the front end of the site perfectly (as long as the site_url settings are set correctly in ’web’ context ie no subdirectory in the paths),
[b]the only problem (so far) I’m facing is that the manager login page will just refresh itself upon logging in.[/b]

It gives no error, just a refresh. Is there a setting for the manager context or in the config.core.php file that can get the manager to cooperate? I’m having a difficult time isolating the problem but it does seem to fix it self after disabling this rewrite rule from the .htaccess file which does not make sense to me because this htaccess file is in web root and the rest of modx is installed in /subfolder/.

Does anyone have an idea how to get the manager to login correctly with this configuration?
(and if it matters I have only tested this in my localhost environment.)
Environment:
modx: rev 2.0.8-pl
localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
-
☆ A M B ☆
- 24,524 Posts
Does it matter what URL the manager uses? You can put a .htaccess file in the manager directory to turn off the rewrite engine, which should be done anyway.
the default .htaccess file in the /manager/ folder is enabled with the rewrite rules turned off for that directory.
I go to www.top-level-domain.com/manager and when I log in the page is refreshed with www.top-level-domain.com/subdirectory/manager. From there it just refreshes the page upon logging in.
Is there a way I can move the manager folder out of the subdirectory into root while leaving the rest of modx in the subdirectory?
Environment:
modx: rev 2.0.8-pl
localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37