If you don’t have an index.php file in your existing site (or any other files that might be overwritten, e.g. a "manager" directory), then you should be able to upload the MODx site to the root of www.domain1.com and test it with friendly URLs off. You should not upload the root .htaccess file either, of course. You can’t test URL rewriting this way, but everything else should work.
You can also upload to a subdirectory and test it in there, in which case you can use friendly URLs also. The only downside to doing it that way is that you might want to move it all to the root later (to avoid having that folder name in your image links, etc.), and this can be disruptive and time-consuming. If you don’t mind the extra directory in your image and file URLs, then the easiest thing is often to just leave MODx in the subdirectory and modify your .htaccess file to redirect to the index.php file in there when you want to go live.
I always choose a subdirectory name that I can live with permanently when I’m testing this way just in case I decide to leave the site there after launch (e.g., not something like "test-install" or "newsite").
That’s good advice, thanks. What I’ve done is created a "site" folder under public_html and managed to get it working in there.
so what would I need to change in the public_html/.htaccess file in order to do the switchover. Do I just copy the .htaccess from /site folder and put it in the public_html/ folder? (seeing as it already has the correct rewrite rule intact?) - see here
# The Friendly URLs part
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /site/index.php?q=$1 [L,QSA]
And that’s it?
Or am I missing some detail here?
TIA
I just tried that for 2 seconds and it didn’t work (e.g. copied the .htaccess to the public_html directory). I must be missing something here then.
Mmmm, even though the site is still in the /site directory?
How does it know to call the files from the domain1.com/site rather than the domain1.com directory then?
Sorry, probably missing something really simple here ....